Reputation: 2325
I cant get the jquery live click to work, it works fine in IE8 but the live click event never fires in Mozilla.
$("li.lidropdown").live("click", function(e) {
alert("click");
var text = $(this).text();
$("a.linkplaylistbutton").text(text);
if (text == 'Large Icons') {
//RenderLargeIconsPlaylist();
}
else {
//RenderDetailsPlaylist();
}
$("ul.uldropdownplaylistaddmedia").hide();
});
<div id="ctl150" class="divplaylistcontainer">
<a class="linkplaylistbutton" onclick="javascript:PlaylistViewClick(this)">Details</a>
<a class="linkselectedbuttondropdown" onclick="javascript:PlaylistViewClick(this)"></a>
<ul class="uldropdownplaylistaddmedia" style="display: block;">
<li class="lidropdown">Large Icons</li>
<li class="lidropdown">Details</li>
</ul>
</div>
Upvotes: 0
Views: 223
Reputation: 3830
I put your code into jsfiddle and tried it in Firefox, and I see the alert.
Upvotes: 0
Reputation: 96266
It should work, you might have a problem with the generated content, do an HTML validation on it. Firefinder could also help.
Also, this looks suspicios:
$("a.linkplaylistbutton").text(text);
did you mean:
text = $("a.linkplaylistbutton").text();
Upvotes: 1