This code:
$(\'#ad img\').each(function(){
if($(this).width() > 125){
$(this).height(\'auto\');
$(this).width(125);
}
});
is working properly on Firefox but not Chrome. The img tags inside of #ad are constricted by height, but if this makes them too wide I need to restrain the width. Is there a better way to do this that would work on all browsers?
The html for the image is as follows:
<img src=\'http://easyuniv.com/img/ads/\".$ad[\'img\'].\"\' height=\'40px\'>





Rating:
The post jquery – javascript working in firefox but not chrome appeared first on Javascript ASK.
via Javascript ASK http://javascriptask.phpfogapp.com/jquery-javascript-working-in-firefox-but-not-chrome.html
No comments:
Post a Comment