I don't think you quite understand what it is you are wanting. Or maybe I'm just a little toooo drunk.. :)

navigation like that has nothing to do with Ajax. Using URLs like that to request Ajax based data/content is something else.

If you really truly mean navigation, then may I suggest just making an anchor tag with the href attribute set to the desired URL? As in standard HTML sans JavaScript.

If you mean you want to make an Ajax request to get content without reloading the page, well, you *could* intercept the click event of the anchor tag and ask for the data returned by the URL at the href.

Something like this maybe:

$("a").click( function () {
  $.ajax({
    url: $(this).attr("href"),
    dataType: "html",
    success: function (response) {
      $("#mydiv").html(response);
    }
  });

  return false;
});

The "return false;" is important. If you don't stop the normal event propagation, your page will continue to navigate as if you had clicked a "normal" anchor tag.

Anyways, I really don't mean to be condescending. I'm just not quite clear what you are asking for, and my impression from your message is that you are not either. Hopefully my feeble attempt points you in the right direction... :)

Shawn

malts...@gmail.com wrote:
Hi there,

I am trying to find some plugin, which can make AJAX request's by
parsing ANCHOR value, from URL...

For example I have an ajax gallery and I want to make navigation like
this

www.example.com/gallery.php#photo=1
www.example.com/gallery.php#photo=2
www.example.com/gallery.php#photo=3

Any suggestions ?

Reply via email to