user2091275
user2091275

Reputation: 81

How to call a function on click in x-editable form (Twitter Bootstrap)

I have a input text field inside a div(x-editable form). I need to call a Jquery function on the button click. How to do so.?

This is my div

<div class="input-append"><input type="text" id="WorkloadName" placeholder="enter your workload name" name=""></div>

This is my jquery function for x-editable form

jQuery.noConflict();
        (function($) { 
          $(function() {
          jQuery.fn.editable.defaults.mode = 'inline';
            jQuery('#WLElementName').editable();
});
})(jQuery);

In x-editable form after clicking the textfield a form will appear, i need to call the function on the click of the submit button (blue button with tick mark, I could not post the image here since I don't have enough reputation score)

I tried calling the function using the class name of the button but its not coming. please help me to fix this

Upvotes: 0

Views: 4853

Answers (1)

cazgp
cazgp

Reputation: 1558

In your .editable declaration, add a dictionary parameter

url: function(params) {}

and perform your task in there.

See http://vitalets.github.com/x-editable/docs.html#editable for further documentation.

Upvotes: 1

Related Questions