Hey !
Thanks man
That was pretty awesome :)

On 06-12 07-49, tlob wrote:
> 
> Noob answers Noob:
> 
> I think you have to put
> $("a").click(function(event){
>   9    event.preventDefault();
>  10    alert("Thanks for visiting- babu!");
>  11    alert("This is my alert");
>  12  });
> 
> in you document.ready function.
> 
> $(document).ready(function(){
>    // Your code here
>  });
> 
> this is a main principle in jquery.
> 
> cheers
> tlz
> 
> 
> On Jun 12, 10:16 am, spx2 <[EMAIL PROTECTED]> wrote:
> > I'm reading a tutorial from 
> > herehttp://docs.jquery.com/Tutorials:Getting_Started_with_jQuery
> > I'm trying the examples given there.
> > A window does not pop-up when I click a link from the ones on the
> > page.
> > Why is this happening ?
> >
> >   1   <html>
> >   2   <head>
> >   3       <script type="text/javascript" src="jquery.js"></script>
> >   4       <script type="text/javascript">
> >   5         $(document).ready(function(){
> >   6                   window.alert('asdasd');
> >   7                   });
> >   8  $("a").click(function(event){
> >   9    event.preventDefault();
> >  10    alert("Thanks for visiting- babu!");
> >  11    alert("This is my alert");
> >  12  });
> >  25       </script>
> >  26   </head>
> >  27   <body>
> >  28       <a href="#asfdas">jQuery</a>
> >  29  <a href="http://google.com/"; class="clickme">I give a message
> > when you leave</a>
> >  30  <a href="http://yahoo.com/"; class="hideme">Click me to hide!</a>
> >  31  <a href="http://microsoft.com/";>I'm a normal link</a>
> >  32   </body>
> >  33   </html>
> 

-- 

Stefan Petrea
homepage     : http://perlhobby.googlecode.com/
mobile phone : (040) 0732070179

Reply via email to