Hello, I an quite new to jquery and hope someone can help with my problem.  I
am trying to load dynamic content in to a div(myobj)... the code i have so
far is more or less as follows.  it creates a box with 2 links, that it gets
from 'name_ctg'.  the links, are category names and when clicked should load
products.php, with the right product, as was determined by the link that was
clicked.  I hope that make sense...  now the problem is that only the first
link works, the second link does nothing.  I hope someone can help.

  

 

<script src="jquery.js"></script>

 <script>
  $(document).ready(function(){
 $("#generate2").click(function(){  
         $("#myobj").fadeOut("fast");
 $("#myobj").slideToggle("slow");
 $("#myobj").load("products.php?idctg_ctg=<?php echo
$row_categorys['idctg_ctg']; ?>");
  });
 
 }); 
  </script>

 <style type="text/css">
<!--
#myobj {
 background-color: #9999CC;
 height: 300px;
 width: 500px;
}
-->
 </style>
</head>

<body>

<div id="myobj" align="center">
  <?php do { ?>  
  < a  href="#" id="generate2" ><?php echo $row_categorys['name_ctg']; ?>
<br>
  <?php } while ($row_categorys = mysql_fetch_assoc($categorys)); ?>
   </div>
</body>
</html>
<?php
mysql_free_result($categorys);
?>

-- 
View this message in context: 
http://www.nabble.com/can-someone-please-help-with-dynamic-links-problem--tp20090838s27240p20090838.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to