This url throws a missing ) after argument error. It is being dynamically generated by PHP. I cannot figure out the correct sequence/placement of single and double quotes to render it.
<a href="cards.html" onmouseover="jQuery('.menu-image li').html('<img src='cards_1.png' />');">Cards</a>
The particular effect desired is to onmouseover insert an image into .menu-image li. All I can figure out is that the img src with the quotes (I’ve tried single and double) is not liked and throws the argument error.
Try escaping the incorrect quotes with
\or\\.I.e.
html('<img src=\'cards_1.png\' />');Alternatively, you can just use
". An URL encoder should have done this for you automatically.A very popular error btw. is to not encode every
&in an URL as&. Browsers usually guess right what was intended though, so people never learn. But the linkis actually incorrect and should be
Now if you had been using an URL encoder instead of just “printing” the string, it should automatically have converted your double quote to
&and probably saved you some headaches.