$('.current_editor .edit').on({
'click': function () {
//do stuff here;
//do stuff here;
}
});
});
See if that takes away you having to double click it. Also, if you can provide a link, someone might be able drill down to the real issue if this doesn't solve it.
-Nathan
On Wed, May 9, 2012 at 7:37 AM, Curious <ovidiu.alexa@gmail.com> wrote:
Hello.
I'm working on a project that involves clone, sortable and live.
Basically there's a table which is sortable and there is a button that
adds another row to the sortable table. Every row has 2 buttons: edit
and delete. If I perfom a sortable action (drag and drop) and then I
click on any button (edit or delete) nothing happens.
$('.current_editor .edit').live('click', function () {
//do stuff here;
});
However, when I click on the same button a second time it works. This
is somewhat random because it happens only on the row that was
dragged.
Is it better to use live or just call a function with
onclick="my_function('id')" ?
And how about the live thingy? Shouldn't it scan the dom for any
selector?
It would be helpful if someone could give me an answer.
Thank you in advance.
--
You received this message because you are subscribed to the Google Groups "JavaScript Forum" group.
To post to this group, send email to javascript-information@googlegroups.com.
To unsubscribe from this group, send email to javascript-information+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/javascript-information?hl=en.
You received this message because you are subscribed to the Google Groups "JavaScript Forum" group.
To post to this group, send email to javascript-information@googlegroups.com.
To unsubscribe from this group, send email to javascript-information+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/javascript-information?hl=en.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.