Click event for dynamically added li element?
Posted
by
user1774460
on Stack Overflow
See other posts from Stack Overflow
or by user1774460
Published on 2012-10-25T14:21:20Z
Indexed on
2012/10/26
5:02 UTC
Read the original article
Hit count: 124
jQuery
I am having totally 20 links.First 10 links directly visible to user and remaining 10 links shown when user hover the down arrow image(used for hover). When user click any one hover link, the link till the currently clicked are moved to left side(another down arrow used for add the right side links to left side dynamically by creating li). This one working fine.But this is not working as vice versa. (i.e)When i click left side link it should navigate to right side.Click event not working for li element that i created dynamically. Please Can any one help for me??????
My sample Code:
//To append the line from right hover to looplink div $('#loop_link').append(''+$('#pagelinkli_'+val3).html()+'');
//To hide the link in right hover div once it selected and appended in loop link div $('#pagelink_a #pagelinkli_'+val3).css('display','none');
//This line to move the link from loop link to left hover div
$('#pagelink_a_left ul').prepend((''+$('#pagelinkli_'+val6).html()+''));
//This line to hide the link in looplink div
$('#loop_link #pagelinkli_'+val6).css('display','none');
This code is like navigating link from right hover to tab and from tab to left hover and vice versa.....
© Stack Overflow or respective owner