Forums

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

Home Forums JavaScript jquery afrer ajax .load use jquery on text

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #26904
    Cyberek
    Member

    Hi.
    I would like to load a page with jquery .load, and then do some changes on loaded page with some jquery functions.
    so it will look like this:

    Code:
    $(“#tempcont”).load(target, function() {
    $(“#center-inner .maincontent”).css(‘display’, ‘none’);
    $(“#center-inner .maincontent”).fadeIn();
    });

    But i need to do the same thing in other places (do the stuff on loaded content), so I was wondering, maybe i will make a function:

    Code:
    $.fn.doactions = function() {
    $(“#center-inner .maincontent”).css(‘display’, ‘none’);
    $(“#center-inner .maincontent”).fadeIn();
    });
    }

    and then call it when i need it:

    Code:
    $.doaction;

    but it seems not to work (i got no errors, but actions are not working).

    Where is the error?

    Thanks in advice.

Viewing 1 post (of 1 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.