Display alert box on click in jquery




<html>
<head>
<script type="text/javascript" src="jquery-1.4.2.js">script>
<script type="text/javascript">
$(document).ready(function(){
$("a").click(function(event){
alert("Redirecting you to jQuery.com!","Alert Dialog");
});
});
script>
head>
<body>
<a href="http://jquery.com/">Click here to know about jQuerya>
body>
html>
 
 
Click to View Demo  


simple example of javascript and jquery, onclicking the link it will redirect to the other pages,
redirecting code to the other pages after clicking in the link

Comments

Popular posts from this blog

Opencart error: Notice: Trying to access array offset on value of type null in ..../vendor/scss.inc.php on line 1753

Creating Class Templates

Fixed: Opencart installation error linux: warning: fopen(system/storage) failed to open stream: Permission denied