Results 1 to 2 of 2

Thread: Dynamic Viewing Modes

  1. #1
    Join Date
    Dec 2011

    Dynamic Viewing Modes

    Im modifying a dynamic product list plugin. I'm trying to to add dynamic viewing options.

    I want the user to be able to switch between these 3 viewing options without having to refresh the page. Once the user decides to view more results, the page would refresh and more results would be displayed, with the same viewing option enabled.

    The code below filters products by price range then runs a loop to display product information using divs.

     // loop over the query list 
    $.each(pageProducts, function(i, object) {  
    // get min and max price range for price range filter slider   
    countCellData++; // flug to know if there is content                
    cell += '<div style="width: 765px; height: 134px;">'; 
    cell += '<div style="float: left;"><img src="'+object.image+'" alt="'+object.title+'" title="'+object.title+'" longdesc="'+object.id+'" border="0" ><\/div>';
    cell += '<div style="float: left;">'+object.title+'<\/div>';
    cell += '<div style="float: left;">'+object.price+'<\/div>';
    cell += '<div style="float: left;">'+object.category+'<\/div>';
    cell += '<\/div>';

    I would like to use the same information (object.title, object.price, etc.) but i want to display the results in different ways using different div styling.

    I had the idea of using "click" JavaScript event, to trigger an event that would implement another div with different styling.

    .click( handler(eventObject) )

    Any ideas or thoughts would be helpful. Thx for reading

  2. #2
    Join Date
    Dec 2011
    I'm sorry for double posting

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center