[jQuery] Re: div contains li - select div but NOT li

2009-04-28 Thread gostbuster
...@gmail.com Assunto: [jQuery] Re: div contains li - 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: $('#plan

[jQuery] Re: div contains li - select div but NOT li

2009-04-28 Thread Ricardo
(Maujor) Samy Silva css.mau...@gmail.com wrote: De: gostbuster jeremyescol...@gmail.com Assunto: [jQuery] Re: div contains li - 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

[jQuery] Re: div contains li - select div but NOT li

2009-04-27 Thread Charlie
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

[jQuery] Re: div contains li - select div but NOT li

2009-04-27 Thread gostbuster
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 : div id=plan /div Then, with CSS, you can do this : #plan{ background:url(my image url); width : image width; height: image height } Well, my image

[jQuery] Re: div contains li - select div but NOT li

2009-04-27 Thread Remon Oldenbeuving
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

[jQuery] Re: div contains li - select div but NOT li

2009-04-27 Thread gostbuster
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 r.s.oldenbeuv...@gmail.com wrote: You could use the event object thats being passed when a click event fires? $('#plan').click(function(e){  if(e.target !==

[jQuery] Re: div contains li - select div but NOT li

2009-04-27 Thread Charlie
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

[jQuery] Re: div contains li - select div but NOT li

2009-04-27 Thread Remon Oldenbeuving
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 jeremyescol...@gmail.com Assunto: [jQuery] Re: div contains li - select div but NOT li Hi, Yes of course I could do this, but Jquery

[jQuery] Re: div contains li - select div but NOT li

2009-04-27 Thread Ricardo
...@gmail.com 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 jeremyescol...@gmail.com Assunto: [jQuery] Re: div contains li - select div but NOT li Hi, Yes of course I could do