Hi Guys,

gotta problem here and i don't know why it occurs:

Example:
Simple Html Page
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <meta http-equiv="content-type" content="text/html;
charset=windows-1250">
  <meta name="generator" content="PSPad editor, www.pspad.com">
  <title></title>
  <script type="text/javascript" src="js/jquery.js"></script>
  </head>
  <body>

    <script type="text/javascript">
    jQuery.noConflict();
      jQuery(document).ready(function() {
        alert( jQuery('#test:eq(1) > a:eq(0)').attr('href') );
      });
    </script>

    <div id="test">
    test
    </div>
        <div id="test">
    test
    </div>
  </body>
</html>

if '#test:eq(0) > a:eq(0)' is set, it returns the right href value.
But when I change it to '#test:eq(1) > a:eq(0)' I only get
"undefinied" from my alert box.

Can anyone explain me why? I dont get it, maybe I'm doing a big
mistake in my "little" code.

thx a lot

Reply via email to