Grow your CSS skills. Land your dream job.

load pages jQuery: do or don’t

  • # June 2, 2009 at 9:08 am

    I’m working on a website for a friend of mine and he really really really wants music to play on his website.
    I absolutely hate music on a website but if he wants it …

    But the problem is he wants it to keep playing when going to other pages. As far as i know, when I click on a link and that page loads, the music will start from the beginning.

    So i was thinking about loading the content part of a page in a "main content" div using jQuery. When I do this, the page doesn’t have to reload and the music keeps playing.

    Is it a good idea to use jQuery like this or not? Maybe the use of jQuery slows down the loading or maybe it goes faster.

    Rob
    # June 2, 2009 at 9:26 am

    yea its fine, as long as you don’t make it to complicated lol you might find yourself tripping over your jQuery ideas – especially when you start clicking links in links with links that link to other linky type places.

    He should know that most people when browsing the web want to be given the option to listen to music, as a lot of people are already listening to their own music… a lot of sites get passed this by creating the music player in a small popup window…

    # June 2, 2009 at 12:57 pm

    I didn’t forget about the possible problem of making it way to complicated with links in content that point to other content that …. :geek:

    But i "forgot" those things just so I could ask my question. I was just wondering if, when a page has a normal header, content and footer, it was slower of faster to load the content area using jQuery. If you have a large header, it will probably save time.

    But let’s take the CSS tricks home page. It looks to me like a wordpress driven site with a header, content area, sidebar and footer. Would it save time to load the content area and sidebar with jquery or would it be faster to "just" reload the page everytime you click a link?

    And for the audio problem. A pop-up may be a solution but the simpliest popup blocker blocks that.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".