Rip's Domain

My JQuery Plugin: PopUpWindow

Posted in Jquery, PopWindow by rip747 on October 26, 2006

This post is outdated. The new plugin can be found here. Please updated any bookmarks.


5 Responses

Subscribe to comments with RSS.

  1. Terrell said, on December 12, 2006 at 5:02 pm

    What I want to do on my blog, is every few hours take the oldest post and move it to the
    front of the queue, all automatically. Anyone know if there is a plugin that can do this or
    a simple way to set up another plugin to do this (use my own feed perhaps)?

  2. rip747 said, on December 13, 2006 at 12:18 pm


    There are several ways to accomplish this, however I’ll tell you how I would do this.

    I would do this on the server end, not the client end using JavaScript. The reason is because in order to this on the client end, you will need to retrieve all the records from your database and then put them into an array in JavaScript. Then grab the last element in the array and place in the first position while moving all the other elements as well. This is fine if you have 10 records in your database, but will be a nightmare if there are 10,000 records.

    What I would do is query your database twice. The first grabbing the oldest record from the table and the second grabbing the other records. So for example:

    SELECT TOP 1 *
    FROM sometable
    ORDER BY creationdate DESC

    SELECT TOP 9 *
    FROM sometable
    ORDER BY creationdate

    Then combine the two queries using your favorite server-side language and display.

    Obviously one of the biggest advantages of doing this on the server end is that you could cache the combined query into a variable in memory or on the disk, so you wouldn’t have to keep hitting the server.

    Anyone else want to take a shot at this?

  3. travis said, on January 29, 2007 at 3:46 pm

    The link goes to an empty page on the jQuery site. Could have something to do with the new site i guess?

  4. Leonard said, on February 10, 2007 at 6:29 am

    Yepp, the page is empty and the plugin doesnt work with the newest jquery anymore because of the following error:

    $(this).href is not a function
    [Break on this error] $(this).href(“#”);

  5. rip747 said, on February 10, 2007 at 11:44 pm


    I know this is going to sound kind of dumb. But I don’t have the code for my popupwindow plugin any where on my machine. If I could get the code, I would update it.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: