Yep, try using "this" instead of "event.currentTarget" so your code
will go something like...

  $('#content A').click( function (event)
                   {
                           var iID_tutorial = $
(this).parent().find("INPUT:checkbox").val();
                   ...

"this" is always available in jQuery's event handlers to refer to the
element in question. I also used the shorter :checkbox selector.

You could also try $(this).siblings("INPUT:checkbox").val() to be even
shorter!

Hope this does the trick for ya,

George

On Aug 14, 5:54 pm, David Garcia Ortega <[EMAIL PROTECTED]> wrote:
> Hi JQueriers,
>
>    I have a problem with JQuery selectors in Internet Exploter (I'm
> using IE7). What I have in DOM is:
>
> ....
> <div id="item">
>    <input type="checkbox" value="4" name="tutorial1"/>
>    <a href="#">
>          <img alt="no publicado" src="img/noeye.png"/>
>          <p>Titulo Tutorial 4: Contenido Tutorial 4</p>
>    </a>
> </div>
> ...
>
> Then, when the user clicks the link inside the "item" div, the
> following happens:
>
> ...
>         $('#content a').click( function (event)
>                 {
>                         var iID_tutorial = $
> (event.currentTarget).parent().find("[EMAIL PROTECTED]").val();
> ...
>
> In iID_tutorial I get the value of the checkbox next to the link the
> user clicks.
>
> In Firefox that selector works properly and I get 4 (according to the
> DOM it this example),
>
> But it IE7 it doesn't work and I get a wonderful  "null".
>
> Any ideas to solve this problem?
>
> Thanks in advance.

Reply via email to