Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('.edit').editable('ajax/save.php?editnotetext', {
- type : 'mce',
- submit : '<button class="save_button">Save</button>',
- cancel : '<button class="cancel_button">Cancel</button>',
- event: 'dblclick',
- placeholder : 'Doubleclick to edit...',
- indicator : 'Saving...',
- tooltip : 'Doubleclick to edit...',
- onblur: 'custom',
- callback : function(){
- console.log('unlocked');
- $.post('ajax/save.php?unlocknotetext', {"id" : $(this).attr('id')});
- },
- onreset : function(){
- console.log('unlocked');
- //myId = $(this).attr('id');
- //alert(myId); this shows up as undefined!
- //alert("onreset works!");
- $.post('ajax/save.php?unlocknotetext', {"id" : $(this).attr('id')});
- }
- });
- $('.edit').each(function() {
- var $this = $(this);
- $this.editable(... /* use $this instead of $(this) here*/)
- });
- curr_form = this[0]; //form object
- par = curr_form.parentNode; //parent,container object
- alert(par.id);
Add Comment
Please, Sign In to add comment