Note that there are some explanatory texts on larger screens.

plurals
  1. POswitching content with jquery
    primarykey
    data
    text
    <p>I am creating a single page web application.I have taken four list elements Home,About us,Gallary,Contact us.After that there are four divs with id home,gallary,about and contact </p> <pre><code> &lt;div id="navigation"&gt; &lt;ul id="nav"&gt; &lt;li&gt;&lt;a href="#!/home"&gt;Home&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#!/about"&gt;About us&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#!/gallary"&gt;Gallary&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#!/contact"&gt;Contact US&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;div id="home"&gt; &lt;h3 style="text-align:center;"&gt;HOME&lt;/h3&gt; text of home goes here...... &lt;/div&gt; &lt;div id="about"&gt; &lt;h3 style="text-align:center;"&gt;ABOUT US&lt;/h3&gt; Text for about us goes here. &lt;/div&gt; &lt;div id="gallary"&gt; &lt;h3 style="text-align:center;"&gt;GALLARY&lt;/h3&gt; &lt;img src="slide1.jpg" width="100%" height="100%"&gt; &lt;/div&gt; &lt;div id="contact"&gt; &lt;h3 style="text-align:center;"&gt;CONTACT US&lt;/h3&gt; Phone:xxxxxxxxxx&lt;br&gt; Mobile:xxxxxxxxxx&lt;br&gt; Email:DD@CC.com&lt;br&gt; Fax:xxxxxxxxxx&lt;br&gt; &lt;/div&gt; </code></pre> <p>The css for this is given bellow.Initially the div with id home is shown and other div are not displayed. </p> <pre><code> #home { width:74%; height:16%; margin-left:13%; border:solid black thin; margin-top:2em; position:absolute; } #about { width:74%; height:16%; margin-left:13%; border:solid black thin; margin-top:2em; position:absolute; display:none; } #gallary { width:74%; height:16%; margin-left:13%; border:solid black thin; margin-top:2em; position:absolute; display:none; } #contact { width:74%; height:16%; margin-left:13%; border:solid black thin; margin-top:2em; position:absolute; display:none; } </code></pre> <p>Now if i click on home then div with id home will display similarly if i click on About Us the div with id about is displayed so is with Gallary and contact.so i want to know how i can do this using jquery effects like slideup fadein etc.And also i want that when i press backspace button on keyboard or on browser the previous div should get loaded.I tried using change hash but i was not successful.To understand my problem better u can see the demo that what actually i want to ask. Also if some one can give jsfiddle for this problem. <a href="http://navi.grantcr.com/#!/home" rel="nofollow">http://navi.grantcr.com/#!/home</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload