- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
- <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.min.js"></script>
- <script type="text/javascript">
- $(document).ready(function(){
-
- $('#action').hide();
- $('#open_hover').click(function(){
- $('#action').fadeIn(500);
- var order_id = $('#open_hover').attr('href');
- $('#action_content').append('<p>'+order_id+'</p>');
-
-
- });
-
- });
- </script>
- <style>
- #action{
- position:absolute;
- margin-top: 20%;
- margin-left: 10%;
- padding:10px;
-
- width:340px;
-
- border:3px solid maroon;
-
- border-radius:5px;
- -moz-border-radius:5px;
- background:pink;
-
- }
- #action #action_content {float:left; font-size:12px}
- </style>
- <div id="action">
- <div id="action_content">Order ID: </div>
- </div>
- <?php
- $x=0;
- $total_link = 10;
- while($x<$total_link){
- $x++;
- ?>
- <li><a href="#<?php echo $x; ?>" id="open_hover" rel="view">View <?php echo $x ;?></a></li>
- <?php } ?>
Hi all.
The link should open a red box.
im not sure why my 2nd link (and the rest) didnt work. Only the 1st link work as expected.