bootstrap-ruby / bootstrap-editable-rails

In-place editing with Twitter Bootstrap for Rails
http://rubygems.org/gems/bootstrap-editable-rails
MIT License
216 stars 52 forks source link

If I add toggle option, how to add other params ? #15

Open sharp opened 11 years ago

sharp commented 11 years ago

Like this

$("#how").click(function(e) {
      e.stopPropagation()
      e.preventDefault()
      $("#com").editable({
        'toggle',
        validate: function(value) {
          if($.trim(value) == '') {
            return 'The content can not be blank!';
          }
        }
      })
    })

I want to both 'toggle by other dom' and 'validate blank' feature