uczę się jquery jednak nie wiem czemu nie działa mi ten oto kod:
$(document).ready(fuction(){ $("a").click(function(){ if(confirm("Czy na pewno chcesz opuscic strone?")){ return true; } else{ return false; } }); });
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta name="generator" content="PSPad editor, www.pspad.com"> <title></title> <script src="jquery.js"></script> <script src="efekty.js"></script> </head> <body> <a href="http://www.google.pl">Link do google</a> </body> </html>
Kod od razu wyświetla linka ktorym jest www.google.pl zamiast zadac pytanie czy chce wyswietlic link