The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

jquery afrer ajax .load use jquery on text

  • # November 27, 2009 at 2:52 am

    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:

    $(“#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:

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

    and then call it when i need it:


    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)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed