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
- <script src="http://code.jquery.com/jquery-latest.pack.js"></script>
- <style type="text/css">
- <!--
- a:link {
- text-decoration: none;
- color: #06F;
- }
- a:visited {
- text-decoration: none;
- color: #666;
- }
- a:active {
- text-decoration: none;
- color: #666;
- }
- a:hover {
- text-decoration: none;
- color: #000;
- }
- #container {
- width: 900px;
- margin-top: 0px;
- margin-right: auto;
- margin-left: auto;
- }
- #target {
- margin-top: 0px;
- margin-left: 0px;
- width: 600px;
- }
- #sidebar {
- float: right;
- width: 290px;
- }
- .ajaxtrigger p {
- font-family: Verdana, Geneva, sans-serif;
- font-size: 12px;
- color: #666;
- text-decoration: none;
- }
- -->
- </style>
- <script type="text/javascript">
- $(document).ready(function(){
- $('a .ajaxtrigger').click(function(){
- var url = $(this).attr('href');
- if(url.match('^http')){
- url = 'proxy.php?url=' + url;
- }
- $('#target').load(url);
- return false;
- });
- });
- </script>
- </head>
- <body>
- <div id="container">
- <div id="target"></div>
-
- <div id="sidebar" class="ajaxtrigger">
-
- <script type="text/javascript" src="http://msdc.createsend.com/t/y/p/ddyuj/0/1/1/1/0/"></script>
-
- </div>
-
- </div>
- </div>
- </body>
- </html>
Is it because the links are created within another script?
thanks for now