[jQuery] Re: Clickable div?

2009-09-07 Thread ConstantMeiring
As far as I know the correct way of pointing to an a in a div is through $('#divname a).click.. Not sure tho, but try it! On Sep 4, 9:00 pm, lukas animod...@gmail.com wrote: Thank you everybody! I made it work by applying display:block and width/height to the a tag within the div. The

[jQuery] Re: Clickable div?

2009-09-04 Thread MorningZ
and don't forget to add the css cursor: pointer to make the user's mouse cursor look like a link On Sep 4, 1:15 pm, Charlie Griefer charlie.grie...@gmail.com wrote: does that div have an id attribute?  if so, $('myDivID').click(function() { do stuff here }); On Fri, Sep 4, 2009 at 10:13

[jQuery] Re: Clickable div?

2009-09-04 Thread lukas
Thank you! It somehow does not work. Here is what I got: $(#logo:a).click(function(){ $.cookie('startCookie', 'default').load('http://www.mylink.com'); }); And here is the html: div id=logoa href=template language defines the link here/ a/div Does anybody have

[jQuery] Re: Clickable div?

2009-09-04 Thread Charlie Griefer
I don't know that you can use a filter the way you're trying to (using the colon in #logo:a). Filters are more like tr:first (matches the first tr element), tr:odd (matches odd-numbered table rows.. good for zebra-striping)... See the sections about the various types of filters at

[jQuery] Re: Clickable div?

2009-09-04 Thread Charlie Griefer
Oooh good call. I had forgotten :) On Fri, Sep 4, 2009 at 10:20 AM, MorningZ morni...@gmail.com wrote: and don't forget to add the css cursor: pointer to make the user's mouse cursor look like a link On Sep 4, 1:15 pm, Charlie Griefer charlie.grie...@gmail.com wrote: does that div have

[jQuery] Re: Clickable div?

2009-09-04 Thread Charlie Griefer
does that div have an id attribute? if so, $('myDivID').click(function() { do stuff here }); On Fri, Sep 4, 2009 at 10:13 AM, lukas animod...@gmail.com wrote: I have a div that only contains an image. How would I create a jquery-click function that basically would represent a normal a tag

[jQuery] Re: Clickable div?

2009-09-04 Thread MorningZ
I don't understand... The first post says I have a div that only contains an image and later on a post says: And here is the html: div id=logoa href=template language defines the link here/ a/div That wouldn't be a div with only an image there On Sep 4, 2:02 pm, Charlie Griefer

[jQuery] Re: Clickable div?

2009-09-04 Thread Anoop kumar V
Can you try this: $(#logo).click(function(){ $.cookie('startCookie', 'default').load('http://www.mylink.com '); }); You do not have to put the a there as logo being the parent will receive the click even as part of the event bubbling. Thanks, Anoop On Fri, Sep 4, 2009 at

[jQuery] Re: Clickable div?

2009-09-04 Thread lukas
Thank you everybody! I made it work by applying display:block and width/height to the a tag within the div. The confusion was created by IE treating the image-containing div differently than the rest of the crop. It tried everything that the next div would not jump below the logo div in IE. The

[jQuery] Re: Clickable DIV possible?

2008-11-21 Thread Hector Virgen
Yes. Any element on the page will respond to click events, except for disabled form inputs. $('div#myDiv').click(function() { alert('myDiv was clicked'); }); -Hector On Fri, Nov 21, 2008 at 2:40 PM, lukas [EMAIL PROTECTED] wrote: Is it possible to click or select a DIV with jquery?

[jQuery] Re: Clickable DIV possible?

2008-11-21 Thread lukas
Thanks for your kind help. I had the wrong path to jquery!