dimanche 5 avril 2015

tag in wrong place

I don't have any idea why my web browsers returns "SyntaxError: Unexpected EOF" errors on my website. I didn't make any changes but something had to change because yesterday same site works fine.


Here is my source code (directly from FTP server):





<script type="">

$(function(){

$("body").append("<div class='tooltip2_showv' id='tooltip2_show'></div>");
$('a.button.notactive').mousemove(function(e){

$('#tooltip2_show').html( $('.popup',$(this)).html());
$('#tooltip2_show').show();
$('#tooltip2_show').css({'top': e.pageY + 5, left: e.pageX + 5,'position': 'absolute'});

}).mouseout(function(){
$('#tooltip2_show').hide();
});
});

</script>



It looks fine but check the same code from web browser (Web Inspector):





<script type="">

$(function(){

$("body").append("<div class='tooltip2_showv' id='tooltip2_show'></script></div>");
$('a.button.notactive').mousemove(function(e){

$('#tooltip2_show').html( $('.popup',$(this)).html());
$('#tooltip2_show').show();
$('#tooltip2_show').css({'top': e.pageY + 5, left: e.pageX + 5,'position': 'absolute'});

}).mouseout(function(){
$('#tooltip2_show').hide();
});
});



End of script tag is in WRONG place! Have you any idea why? It's not the only wrong placed "end of script" tag.


Happy Easter ;)





Aucun commentaire:

Enregistrer un commentaire