load html in DIV from dynamic feed or script

load html in DIV from dynamic feed or script

Hi

I am trying to collate or the email newsletter I have created into one place on my site.

I have borrowed so code that looked like it should work but it keeps jumping to another page.


my code


  1. <script src="http://code.jquery.com/jquery-latest.pack.js"></script>

  2. <style type="text/css">
  3. <!--

  4. a:link {
  5. text-decoration: none;
  6. color: #06F;
  7. }
  8. a:visited {
  9. text-decoration: none;
  10. color: #666;
  11. }
  12. a:active {
  13. text-decoration: none;
  14. color: #666;
  15. }
  16. a:hover {
  17. text-decoration: none;
  18. color: #000;
  19. }
  20. #container {
  21. width: 900px;
  22. margin-top: 0px;
  23. margin-right: auto;
  24. margin-left: auto;
  25. }
  26. #target {
  27. margin-top: 0px;
  28. margin-left: 0px;
  29. width: 600px;
  30. }



  31. #sidebar {
  32. float: right;
  33. width: 290px;
  34. }
  35. .ajaxtrigger p {
  36. font-family: Verdana, Geneva, sans-serif;
  37. font-size: 12px;
  38. color: #666;
  39. text-decoration: none;
  40. }
  41. -->
  42. </style>

  43. <script type="text/javascript">

  44. $(document).ready(function(){
  45.   $('a .ajaxtrigger').click(function(){
  46.     var url = $(this).attr('href');
  47.     if(url.match('^http')){
  48.       url = 'proxy.php?url=' + url;
  49.     }
  50.     $('#target').load(url);
  51.     return false;
  52.   });
  53. });

  54. </script>

  55. </head>

  56. <body>
  57. <div id="container">
  58.   <div id="target"></div>
  59.   
  60.     <div id="sidebar" class="ajaxtrigger">
  61.     
  62.     <script type="text/javascript" src="http://msdc.createsend.com/t/y/p/ddyuj/0/1/1/1/0/"></script>
  63.     
  64.     </div>
  65.   
  66.   </div>
  67. </div>
  68. </body>
  69. </html>
Is it because the links are created within another script?

thanks for now