Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/styllloz/public_html/qa-include/qa-base.php on line 1175

Warning: session_start(): Cannot start session when headers already sent in /home/styllloz/public_html/qa-include/app/users.php on line 162

Warning: Cannot modify header information - headers already sent by (output started at /home/styllloz/public_html/qa-include/qa-base.php:1175) in /home/styllloz/public_html/qa-include/app/users.php on line 1267

Warning: Cannot modify header information - headers already sent by (output started at /home/styllloz/public_html/qa-include/qa-base.php:1175) in /home/styllloz/public_html/qa-include/app/page.php on line 356
JQuery does not set the attributes onmouseover and onmouseout in google chrome? - code-flow.club | Q&A

JQuery does not set the attributes onmouseover and onmouseout in google chrome?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
9 views
On the onload event hang up function which reduces the large image on the page.


If you hover your mouse cursor over the picture should become of original size. If you do so

$(this).attr({ width: width_resized, onmouseover: '$(this).attr("width", ' + width + ');', onmouseout: '$(this).attr("width", ' + width_resized + ');' });


in Fox and Opera works fine, but in chrome is only set width.

$(this).attr("onmouseover", '$(this).attr("width", ' + width + ');');


So, too, does not work.


In what may be the problem?
by | 9 views

2 Answers

0 like 0 dislike
The problem is that you have custom jQuery for the API that it could not support.
\r
To do this:
\r
$(this) .width(width_resized) .mouseover(function () { $(this).width(width); }) .mouseout(function() { $(this).width(width_resized); }); 
by
0 like 0 dislike
The fact that you set the attribute, and hence not working correctly in different browsers.
Here in this article is the answer DOM: properties VS attributes.
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
3 answers
0 like 0 dislike
1 answer
0 like 0 dislike
5 answers
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
35,181 users