tags:

views:

22

answers:

1

Hi! I'm looking for jquery plugin that can switch content with buttons.

e.g.

In the page it would look like this: [Prev] some text within a div [Next]

By pressing a button (next or prev) the div changes with the content to next div in the page that probably is hidden before pressing the buttom... something like that.

I hope you got my idea!

Any suggestions? Thanks in advance!

A: 

Without a plugin, you can see a simple working example here:

http://jsfiddle.net/gfosco/fG9N9/

Fosco
What is with that "framework onLoad" ? I copied it but it doesn't work.. should I add something?
arturs
the code should be in a `$(document).ready(function() { <the-js-code-here> });` block.
Fosco
Ok! it worked! Perfect!
arturs
Just one more thing... why when it dispalys content, it removes/doesn't show any formating, tags - <b><span> etc?
arturs
@arturs ah, replace the `.text()` references with `.html()`
Fosco
Thank you very much!
arturs