I am having some problems getting this part of my jQuery script to run after the Ajax – content switch…
/*no right click on img*/
$('img').bind('contextmenu', function(e) {
return false;
/*rollover*/
$('.roll').on('mouseenter mouseout', function() {
var original = $(this).attr('src');
var replacement = $(this).data('hoverimg');
$(this).attr('src', replacement).data('hoverimg', original);
});
});
Could someone please help me get it running I tried it whit a lot of Ideas, like:
var init = function(){
/*Code*/
}
Or
function init(){
/*Code*/
}
I am a bit confused right now.