|
| |||||||||
| Tags: div, hide, show |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| ||||
| ||||
| Need help to show/hide div There are 6 categories, the user clicks on the image of one of the categories STEP 1: The user arrives on the home page of the gallery, and has the choice among the categories of creations Step2: The user clicks on the category he wishes, and magic category appears below Step2 (a): If the user clicks on another category (eg headers), the category shown above disappears and the new displays (always in this example, signatures headers disappear and appear ) For part of what appears, sql queries are functional, they are no problems. As against that plot thickens when the famous "I click on the image and the corresponding displayed creations". A friend told me to do so with the click () method and using the property display in a div (each category containing a div), but being a beginner deep js and after some research, I still do not understand at all. Can anyone help me please? |
|
#2
| ||||
| ||||
| Re: Need help to show/hide div
Your friend is right. But first you must know all classes are loaded into the source code when you view the page, where you want to retrieve them click?
|
|
#3
| ||||
| ||||
| Re: Need help to show/hide div
I suppose, all classes loads in the source code to display the page
|
|
#4
| ||||
| ||||
| Re: Need help to show/hide div
So we need every category is in a DIV which is not displayed by default (display: none). In PHP, $ cat_id is the number one category. Code: <div style="display: none;" id="cat_id_<?=$cat_text?>"><?=$cat_text?></div> <a href="#" onclick="manage(1); return false;"><img src="" /></a> JavaScript function manage(n) displays/hides the div ID n (with document.getElementById (n). Style.display) |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Need help to show/hide div" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to hide and show cursor in Visual C + + | Mrigankasekhar | Software Development | 5 | 1 Week Ago 11:50 PM |
| show/Hide playlist in Windows Media Player 11 | Iesa | Windows Software | 3 | 17-02-2009 09:42 PM |
| Show, hide, or resize desktop icons of Windows Vista | WindowsGeek | Customize Desktop | 1 | 13-01-2009 04:00 PM |
| How to show or hide the Recycle Bin in Windows Vista? | Venator | Customize Desktop | 3 | 13-01-2009 11:39 AM |
| Hide or Show Libraries in the Navigation Pane of Windows 7 Explorer | WindowsGeek | Tips & Tweaks | 1 | 05-01-2009 04:56 PM |