Andy I know that was a dumb question but I really appreciate your help.
There is this entire body of knowledge that jQuery assumes that is really
not covered in any of the docs.

Can I pass parameters to the function with this ID approach?

 

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Andy Matthews
Sent: Friday, July 20, 2007 8:24 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Click to call a fuction?

 

Easy to do what you want:

 

<img src="someimage.jpg" id="myImage">

 

$('#myImage').click(function(){

    alert('testing');

});

 

  _____  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mitchell Waite
Sent: Friday, July 20, 2007 9:21 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Click to call a fuction?

Is there a way to call a jQuery function when someone clicks on an image
without making that image a hyperlink.

 

If that is the only way is there something you can put in the href to
eliminate the border that hyperlinks make.

 

Thanks

 

Mitch

 

PS I posted this as a question from Goofy last night and no one answered it.
Perhaps now that my status has been so graciously elevated and I am planning
a jQuery for Dummies book, someone might help me. Here is the previous
question

 

Why won't this work. It's so simple. I just want to call a function using
the on lick event. I want it to move a div called Panel.

 

I set up the function

 

                                function advmode() (

 
$("#Panel").SlideInRight(1000);

                                };

 

Then inside a table cell with an image for a button I have this simple link

 

                                <a href="#Javascript;"
onclick="advmode()"><img src="images/Advanced Search Button Wide_No.png"
width="250" height="25" />

 

I must be missing something really basic because this does not come close to
working. But this does:

 

                                <a href="#Javascript;"
id="PanelButtonOpen2"><img src="images/Advanced Search Button Wide.png"
width="250" height="25" />

 

                                $('#PanelButtonOpen2').click(function() {

                                $("#Panel").SlideOutRight(1000);

                                });

 

Thanks for any aid I am feeling very silly tonight.

 

Mitch

 

Reply via email to