javascript - Show/Hide Content without reloading the page -


I have three content boxes that I want to show and hide using controls. The HTML is as follows:

  & lt; Div id = "leermat1" & gt; The content here & lt; One square = "page-next" & gt; Next & lt; / A & gt; & Lt; One square = "back-past" & gt; Previous & lt; / A & gt; & Lt; / Div & gt; & Lt; Div id = "leermat2" & gt; The content here & lt; One square = "page-next" & gt; Next & lt; / A & gt; & Lt; One square = "back-past" & gt; Previous & lt; / A & gt; & Lt; / Div & gt; & Lt; Div id = "leermat3" & gt; The content here & lt; One square = "page-next" & gt; Next & lt; / A & gt; & Lt; One square = "back-past" & gt; Previous & lt; / A & gt; & Lt; / Div & gt;   

I have two anchors pug-next and page-back, which should be visible to the content divide at any point:

I want to write like jquery , When # leermat1 'pag-next' is clicked, it hides #lermet1 and shows #lermat2 then when #lermat 1 is hidden and shows #lermat2, when on '.pag-next' Is clicked, it hides #Lermat 2, and #Lermat 3 shows

Apart from this, 'Pag-east' is also similarly should work.

I started with the following, but I do not know where to go from here.

  $ (document) .ready (function () {$ ('.pag-next'). ('Click', function () {$ ('# leermat1'). AddClass ('hide'); $ ('# lermat2'). AddClass ('show');});});   

One more thing is that '.pag-next' should stop working after showing #lermat3.



Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -