Forums

Fade Anything - How to fade new post (9 posts)

  1. vetto
    Member
    Posted 6 years ago #

    I have both the "Fade Anything Technique" js installed, and the Twilight FAT plugin (not both at the same time). I can successfully fade different elements of my site, but I am trying (in vain) to figure out how to fade just the last post like here in the WP support.

    I think I have to get the post ID and pass it to a custom script, but not sure. Anyone know how WP did this?

  2. vkaryl
    Member
    Posted 6 years ago #

    Don't know, but the stuff here is done with Ajax. You might do a google search for info on it, and here's a link to one article: http://www.adaptivepath.com/publications/essays/archives/000385.php

  3. vetto
    Member
    Posted 6 years ago #

    Thanks, I will look it up.

  4. vetto
    Member
    Posted 6 years ago #

    From what I gather, AJAX is the server-client operations that perform background functions so the user experience seems seemless...WP may use AJAX in the posts (I believe you if you say so), but I think the fade is the YFT or FAT. Does the ajax transaction call the Yellow Fade Technique (or FAT or whatever?)

    I can't see how I can identify the new comment on the page refresh to somehow pass that info to the FAT javascript.

  5. vetto
    Member
    Posted 6 years ago #

    actually, I just posted above and the page never refreshed! THAT is what AJAX does...

    Now how to do the fade without ajax...hmmm

  6. vetto
    Member
    Posted 6 years ago #

    LOL, vkaryl: just saw you are a mod...do you know of any way to do this without AJAX? I am not that smart yet to employ such a solution.

  7. vkaryl
    Member
    Posted 6 years ago #

    I don't, vetto. I know that AJAX is being used here to instantly update the posts, but I am ANYTHING but a coding whiz....

    I can tweak stuff, but not originate it. Big difference. I would bet there's some js out there that does what you want or something similar that would be tweakable, but I don't actually know what it is, so of course don't know where to find it. I'd suggest you start living on the free-script sites. And google IS your friend - or yahoo if that's your pref.

    In fact, to point up my own "brainfade" in this direction, there's a post by Denis deBernardy re some updates to various of his plugins, one of which is a "simple" framebuster - and which I posted I was very glad to have.... because I can't write the "two simple" lines of js....

    [[BTW, being a mod doesn't mean I KNOW anything, y'know? All it means is that I spend a lot of time here anyway, and I'm relatively trustworthy and somewhat knowledgeable! *laughing*]]

  8. vetto
    Member
    Posted 6 years ago #

    Thanks. ;)
    I think I will have to create my own js to pass the newly created comment ID to the fade script so ONLY that id gets faded...should be do-able, I can read js pretty well but writing it is another story. (kinda like english)

    Im leaving this open for a few days to see whatelse anyone thinks.
    Any js coders out there?

  9. TJworld
    Member
    Posted 6 years ago #

    Include this Javascript file in your page

    http://wordpress.org/support/bb-scripts/fat.js

    Create your new element and its children, and their content, using W3C DOM methods:
    var mytag = document.createElement('div');
    mytag.id = '1049395'; // unique name
    // ...
    (for examples see function newTagCompletion() in http://wordpress.org/support/bb-scripts/topic.js)

    // call the fade function
    Fat.fade_element(newcomment.id);

Topic Closed

This topic has been closed to new replies.

About this Topic