Development Recently built site w/ jQuery/AJAX

Discussion in 'Software' started by DarkLord7854, 25 Sep 2010.

  1. DarkLord7854

    DarkLord7854 What's a Dremel?

    Joined:
    22 Jun 2005
    Posts:
    4,643
    Likes Received:
    121
    Been having a bit of fun with jQuery lately, built the following:

    http://dev.diazcooper.com/AFX/product-comparison/chart


    If you click on either of the "50 point search" links it'll slide out content at the bottom of the page. The two links have different background colors and the slider will retract and re-open when switching between the two, also clicking on the link again will close the slider.

    Clicking the View Samples links will open modal windows as will the "Platinum bonus features" button.

    The site is built in Drupal also, and that page is a collection of different Views pulling different pieces of content.

    Just thought I'd share :)
     
    Last edited: 25 Sep 2010
  2. Zoon

    Zoon Hunting Wabbits since the 80s

    Joined:
    12 Mar 2001
    Posts:
    5,496
    Likes Received:
    630
    Nice stuff :D
     
  3. capnPedro

    capnPedro Hacker. Maker. Engineer.

    Joined:
    11 Apr 2007
    Posts:
    4,381
    Likes Received:
    241
    You have nothing to fall back on for users with JavaScript disabled.
     
  4. DarkLord7854

    DarkLord7854 What's a Dremel?

    Joined:
    22 Jun 2005
    Posts:
    4,643
    Likes Received:
    121
    Yea, I've thought about that, I could do it with CSS, or make it be slid-out by default and then set it to be hidden as soon as you hit the page if you have JS enabled. I'd have to change how the modal works though to make it switch out the link if JS is enabled so that if it isn't, it opens a new window.
     
  5. capnPedro

    capnPedro Hacker. Maker. Engineer.

    Joined:
    11 Apr 2007
    Posts:
    4,381
    Likes Received:
    241
    Nah, it's easier than that; just make a regular HTML page with the information on, then change you links to look like
    Code:
    <a href="chart.html" onclick="OpenModal('comparechartmodal','text'); return false;">
    Now people who middle click the link can open it in a new window and you don't alientate people who choose to disable JS, or people who can't view rich content (such as screen readers for the blind).
     
  6. DarkLord7854

    DarkLord7854 What's a Dremel?

    Joined:
    22 Jun 2005
    Posts:
    4,643
    Likes Received:
    121
    Hmm, good point, I'll see what I can do :cooldude:
     

Share This Page