> or a less efficient but explanative way:
>
> > > $('#plan').click(function(){
> > > //do stuff});
>
> > > $('#plan li').click(function(e){ //or #plan > *
> > > return false;
> > > //returning false calls e.stop
gt; //returning false calls e.stopPropagation() and e.preventDefault
> > ()
> > });
>
> > cheers,
> > - ricardo
>
> > On Apr 27, 10:26 am, Remon Oldenbeuving
> > wrote:
>
and e.preventDefault
> ()
> });
>
> cheers,
> - ricardo
>
> On Apr 27, 10:26 am, Remon Oldenbeuving
> wrote:
>
> > It looks obvious, but aint working for me.
>
> > On Mon, Apr 27, 2009 at 3:16 PM, Mauricio (Maujor) Samy Silva <
>
> &g
orking for me.
>
> > On Mon, Apr 27, 2009 at 3:16 PM, Mauricio (Maujor) Samy Silva <
>
> > css.mau...@gmail.com> wrote:
>
> > > De: "gostbuster"
> > > Assunto: [jQuery] Re: div contains -> select div but NOT li
> > > Hi,
> >
On Apr 27, 10:26 am, Remon Oldenbeuving
wrote:
> It looks obvious, but aint working for me.
>
> On Mon, Apr 27, 2009 at 3:16 PM, Mauricio (Maujor) Samy Silva <
>
> css.mau...@gmail.com> wrote:
>
> > De: "gostbuster"
> > Assunto: [jQuery] Re: div contai
It looks obvious, but aint working for me.
On Mon, Apr 27, 2009 at 3:16 PM, Mauricio (Maujor) Samy Silva <
css.mau...@gmail.com> wrote:
>
>
> De: "gostbuster"
> Assunto: [jQuery] Re: div contains -> select div but NOT li
> Hi,
> Yes of course I could do t
De: "gostbuster"
Assunto: [jQuery] Re: div contains -> select div but NOT li
Hi,
Yes of course I could do this, but Jquery selectors don't allow what I
wish to do?
Thanks.
--
How about:
$('
what you are doing is called event delegation, there's more to it than
simple selectors . You could be clicking in the div but not on an li or
clicking on the contents of an li. That's what was meant by " //You
will have to check whats the real target " for a list item
$('#plan').click(funct
Hi,
Yes of course I could do this, but Jquery selectors don't allow what I
wish to do?
Thanks.
On 27 avr, 14:25, Remon Oldenbeuving
wrote:
> You could use the event object thats being passed when a click event fires?
>
> $('#plan').click(function(e){
> if(e.target !== "liobject"){ //You will
You could use the event object thats being passed when a click event fires?
$('#plan').click(function(e){
if(e.target !== "liobject"){ //You will have to check whats the real target
for a list item
//here your code
}
});
On Mon, Apr 27, 2009 at 2:08 PM, gostbuster wrote:
>
> Okay I'll try to
Okay I'll try to explain better.
Imagine an image, it's a rectangle.
you can have a div with this image for background :
like this :
Then, with CSS, you can do this :
#plan{
background:url(my image url);
width : image width;
height: image height
}
Well, my image is representing
your question isn't very clear . If you are trying to select based on
what is inside the div these should help:
$("div:contains("Some Text")).// do something
or
$("div:has(li[class=something])").// do something
http://docs.jquery.com/Selectors
need to be more specific what you are trying
12 matches
Mail list logo