I'm relative new to jQuery, but I usually use "function(e)" instead of
"function()" within a "click" handlers, because when you do it on a
selector that do not return a single element ("#cat_list > div"
returns several dom element) you cannot access the data you need
(e.target is the element you clicked). "#cat_list" return a single dom
element and it's not a problem
I don't know if this is the issue

On 3 Dic, 16:03, Civette <la.cive...@gmail.com> wrote:
> Well i'm in trouble.
>
> Following code does not trigger :
>
> Code: Select all
>     $("#cat_list > div").click(function()
>     {   alert("Bye bye!");;
>     });
>
> neither
>
> Code: Select all
>     $("#cat_list ~ div").click(function()
>     {   alert("Bye bye!");;
>     });
>
> or
>
> Code: Select all
>     $("#cat_list > *").click(function()
>     {   alert("Bye bye!");;
>     });
>
> Altough this works :
>
> Code: Select all
>     $("#cat_list").click(function()
>     {   alert("Bye bye!");;
>     });
>
> HTML code looks like :
>
>     <div id="cat_list">
>     <div id="39">a</div>
>     <div id="40">b</div>
>     ...
>     </div>
>
> Any idea ?
>
> thanks

Reply via email to