Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other jQuery, AJAX, and mediawiki

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #23292
    zero
    Member

    I’m usually able to find this stuff on my own, but this doesn’t look like a quick fix.

    Let’s say I wanna AJAXify my Mediawiki installation by using jQuery:

    Code:
    $(“a”).click(function(){
    $(“#column-content”).load(“THE-URL-CLICKED”);
    });

    How do I get the url of the anchor into the .load argument? My first instinct is to use a variable, obviously, but I have no idea how to extract the url of the anchor and set it as var URL, or if I can use it as an argument in .load().

    I’ve never used the css-tricks community as a resource before, so let’s see what you guys can do. :D

    #49917
    Edwin
    Member

    Haven’t tested it, but thwat you think of this.href ?

    #50143
    zero
    Member
    Code:
    var path = $(“a”).attr(“href”);
    $(“a”).click(function(){
    $(“#column-content”).load(path);
    });

    :( Didn’t work. I just ended up simplifying and minimalizing the design of the wiki, and then linking to it from an iframe in a wordpress page. Works fine. Thanks though, I’m gonna have to find a way to put this $("a").attr("href"); bit of code to good use. ;)

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Other’ is closed to new topics and replies.