And just so you're not totally confused, these two snippets are  
functionally the same. The first is just a short-hand version of the  
second:

from Paul McLanahan:
> $(function(){
>       $('p').click( function() { alert("Hello"); } );
> });

from Chris W. Parker:
> $(document).ready(function() {
>       $('p').click( function() { alert("Hello"); } );
> });

-- Karl
___________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com

>
> On 11/3/06, Muckinger <[EMAIL PROTECTED]> wrote:
>>
>> I want to use events with jquery and tried the example:
>>
>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
>> <html>
>> <head>
>>         <script type="text/javascript" src="/js/jquery.js"></script>
>>         <script type="text/javascript">
>>   // <![CDATA[
>>
>>         $("p").click( function() { alert("Hello"); } );
>>
>>   // ]]>
>>   </script>
>> </head>
>> <body>
>> <p>Hello</p>
>> </body>
>> </html>
>>
>> But nothing happens, also with the other events (dblclick,  
>> mousedown etc.)
>>
>> Can someone help me out??
>> --
>> View this message in context: http://www.nabble.com/Problem-with- 
>> Events-tf2569714.html#a7163372
>> Sent from the JQuery mailing list archive at Nabble.com.
>>
>>
>> _______________________________________________
>> jQuery mailing list
>> [email protected]
>> http://jquery.com/discuss/
>>
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to