$('.BizCard.selectable').live('click', function () { blah; });
Knowing that we should now use the on() function instead, I changed it to:
$(window).on('click', '.BizCard.selectable', function () { blah; });
This seemed to work OK until I got a bug report that it wasn't working in IE8 and lower. Took a while to work it out, but turns out you can't attach a click handler to the window object in IE before IE9. Therefore the workaround was to attach to document instead:
$(document).on('click', '.BizCard.selectable', function () { blah; });
No comments:
Post a Comment
Comments are very welcome but are moderated to prevent spam.