code fails to work outside a jsFiddle
I aim to make a web page with interactive videos, and while searching here I came across a link pointing to a jsFiddle that suits my needs . As the code worked perfectly fine on the jsFiddle, it broke down when i tried to copy it into DreamWeaver (it seems the JavaScript had stopped working). I had put it all together as such: <html> <script type="text/javascript" src="jquery-1.7.1.min.js"></script> <script type="text/javascript" src="sgrub.js"></script> <script> $('#video_1, #video_2').hide(); $('.icon_1').click(function() { $('#video_2').fadeOut(function() { $('#video_1').fadeIn(); }); }); $