I have a script that I reuse in lots of different places. The script has several image paths specified, and I want to make it easier to implement by setting one 'path' variable at the start then calling the variable in place of the full url. e.g.
jQuery(document).ready(function($){
var path = "http://www.mydomain.com/images/";
$(".menu img.arrow").click(function(){
$(this).attr('src', path + 'arrow_hover.png');
})
});
Any pointers?