javascript - jQuery code does not work in Safari for Windows -



javascript - jQuery code does not work in Safari for Windows -

i have written code below in javascript file:

$( document ).ready(function() { $("#fbhtmlimage .image_thumb").live('click',function(){ $(this).parent().find("label").click(); }); $("#dropboximagecontent .image_thumb").live('click',function(){ $(this).parent().find("label").click(); }); $("#instagramfrm .image_thumb").live('click',function(){ $(this).parent().find("label").click(); }); });

it working fine in browsers including safari mac. same code not working in safari windows.

i have tried,

$( document ).ready(function() { $(document).on("click","#fbhtmlimage .image_thumb",function() { $(this).parent().find("label").click(); }); $(document).on("click","#dropboxcontent .image_thumb",function() { $(this).parent().find("label").click(); }); $(document).on("click","#instagramfrm .image_thumb",function() { $(this).parent().find("label").click(); }); });

for e.g.

$( document ).ready(function() { $("#fbhtmlimage .image_thumb").on('click',function(){ $(this).parent().find("label").click(); }); //for facebook });

hope work .live() deprecated.

for ref : http://api.jquery.com/on/

javascript jquery safari

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -