Jump to content

pengu

Members
  • Posts

    154
  • Joined

  • Last visited

    Never

About pengu

  • Birthday 07/01/1988

Contact Methods

  • AIM
    ThatsCoolWatEva
  • MSN
    wazzup_lala@hotmail.com

Profile Information

  • Gender
    Not Telling
  • Location
    Australia

pengu's Achievements

Member

Member (2/5)

0

Reputation

  1. Amazing, thought someone would respond by now. Anyways, I've got this far (see code). But it's not loading my pages into the DIV. Works firefox. No go Chrome. <!DOCTYPE html> <html> <head> <script src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript"> $(document).ready(function() { $('.spLink').click(function(e) { e.preventDefault(); var href = $(this).attr('href'); $('.spResult').load(href); //alert(href); }); }); </script> </head> <body> <h1>Test</h1> <p><a href="./test.html" class="spLink">Click</a></p> <p><a href="test2.html" class="spLink">Click</a></p> <p><a href="test3.html">Click</a></p> <div class="spResult"> </div> </body> </html>
  2. First off, I hope I've posted this in the correct spot. Apologies if I have not. All I want is a couple of links, lets say 1 2 and 3, they're all href links that lead to some page, but they have an "id" within the HREF. So when I click them, I want them to load the results into a div, not just load another page. What I have so far.. <!DOCTYPE html> <html> <head> <script src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript"> $("#spLink").click(function(){ $("#spResult").html(ajax_load).load(); }); </script> </head> <body> <h1>Test</h1> <p><a href="test.html" id="spLink">Click</a></p> <p><a href="test2.html" id="spLink">Click</a></p> <p><a href="test3.html" id="spLink">Click</a></p> <div id="spResult"> </div> </body> </html> Help!
  3. I think people do the same as me, look at this post and think it's shifty..
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.