I wrote a simpe inline edit using jquery. The plugin work very well, but i have a problem when i call the script within a javascript function, it require 2 click to activate the plugin. Does anyone know a way to solve this issue.. i want it in one click! Thanks in advance.
<a onclick="update(1)"> Let's update<a/>
function update(id)
{
$("#edit" + id).kb_edit();
}
If the functionality in the plugin requires the click event handler that you’re setting up inside, then that means it won’t be set up until you run
.kb_edit().So the first click runs
.kb_edit(), which sets up theclickhandler.Then the second click actually gets to trigger whatever was set up by the first click.