Home › Forums › JavaScript › [Solved] Jquery switch view modes without refresh
- This topic is empty.
-
AuthorPosts
-
July 7, 2011 at 1:43 pm #83007jamygoldenMember
@alphakurt You’re saying that you are doing the same thing, but your HTML/PHP doesn’t seem like it. Explain to me exactly what you are trying to do. If you’re trying to refresh a product list, there must be a .php file somewhere which contains that list.
July 8, 2011 at 2:37 am #83028alphakurtParticipantI have a product list, displayed here : http://beta.prijsjagers.be/babyfoon~1044.htm#
currently it is displayed in a grid, I would like to have link / button to let a user switch between e grid and a list display..
I have the css for the grid and the css for the list.. but im unable to switch between one and the other
July 8, 2011 at 5:06 am #83030jamygoldenMemberAhh ok, this is actually very simple :)
You have a div:
Add an id to that, like:
Then make the list styling dependent on the id #list
Then all we need to do is toggle that ID on the div when the button is clicked. Am I making sense?
July 8, 2011 at 7:45 am #83035alphakurtParticipantim sorry I completely dont understand .
I tried to change the code ..but nothing happens.
I have changed the following ( I didnt use pl box as this is to define the big square in which products are displayed )
= getProductThumbnail($pId, $pLink, $row, $cId, '90', '90', 'ListingThumbnailBox') ?>
= getFormattedPrice($pMinPrice, $currencySymbol, $currencyRate)?>
= $pMinPrice==$pMaxPrice?'':(" - ".getFormattedPrice($pMaxPrice, $currencySymbol, $currencyRate)) ?>
getUserProductLink($pId, $storeCount, $pLink) ?>
" onclick="return fbs_click()" target="_blank"class="fb_share_link" alt="="Deel dit product met je vrienden op facebook"?>" title="="Deel dit product met je vrienden op facebook"?>">
and
= getProductThumbnail($pId, $pLink, $row, $cId, '90', '90', 'ListingThumbnailBox') ?>
= getFormattedPrice($pMinPrice, $currencySymbol, $currencyRate)?>
= $pMinPrice==$pMaxPrice?'':(" - ".getFormattedPrice($pMaxPrice, $currencySymbol, $currencyRate)) ?>
getUserProductLink($pId, $storeCount, $pLink) ?>
" onclick="return fbs_click()" target="_blank"class="fb_share_link" alt="="Deel dit product met je vrienden op facebook"?>" title="="Deel dit product met je vrienden op facebook"?>">
and then changed the JS to:
July 8, 2011 at 8:28 am #83036jamygoldenMemberHave a look at this: http://jsfiddle.net/mgNQy/
You can use the same concept.
July 8, 2011 at 8:48 am #83039alphakurtParticipanti already looked at this.. but I have no clue how to integrate the DIV classes into the li arguments..
:(
to summarize
I have a div called <div class=”PLBox”>
in this class I have several nested div’s for the grid display :
the same for the list display :
I want to be able to switch these two blocks of nested divs
July 8, 2011 at 10:09 am #83042jamygoldenMemberCan’t you do something like this: http://jsfiddle.net/mgNQy/1/ ?
I’m really not understanding what the problem is. Aren’t you able to edit the HTML?July 8, 2011 at 10:10 am #83043alphakurtParticipantsee my earlier post.. im not working with a list.. im using nested divs to display the products.. see code I posted
July 8, 2011 at 10:15 am #83044jamygoldenMemberDoes it make a differenece whether it’s a list or not? Basically all elements are the same thing with different names. Your site crashed my browser twice lol (After opening web-inspector)
Your Row nests start with “ListingRow” and list nests start with “Listinggrid”. So you can do the same thing as in example #2.
July 8, 2011 at 10:17 am #83045alphakurtParticipanti tried to do that. but its not doing anything… what example are you referring to?
I guess I need a line by line explanation… :(
thanks already for the time you spend on this
July 8, 2011 at 10:34 am #83046jamygoldenMemberNp. Haha ok cool. Let’s make this very simple. A simplified example of your grids and rows is as follows:
Example
(one of the listings is currently hidden via CSS though)
So very very basically, that’s what your page looks like, right?July 8, 2011 at 10:38 am #83047alphakurtParticipantyep this is more or less it.. and one is hidden because you explained this in your first example
July 8, 2011 at 10:48 am #83048jamygoldenMemberAll I have done to that (which is different from the simplified version above) is added “parent-list” on each of those lists.
July 8, 2011 at 12:58 pm #83051jetk001MemberI was wondering even though this site is done in flash I am looking for another way preferably with css, java or jquery to create this sort of a menu.. what do you think guys can this be done with css or does it need to be done in flash only? here is the subject site. http://aerostudios.com/
-
AuthorPosts
- The forum ‘JavaScript’ is closed to new topics and replies.