Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JQuery Carousel for Form Elements

Tags:

jquery

I am looking for a jQuery carousel style plugin which can handle form elements.

Here is what I need to do.

I have three form elements: two regular text boxes and a textarea. There are also two buttons, previous and next.

On clicking the next button, the text boxes/textarea switch their content.

I realize I can do this via Ajax, but I'm looking for a plugin solution.

like image 325
Jason Avatar asked Sep 10 '26 20:09

Jason


2 Answers

Here's an example of a carousel plugin I converted from an html 5 project of mine to html 4.
http://jsfiddle.net/bcnobel/pYUJN/

The code doesn't contain a part where it responds to a button click, but it responds to the mouse position. However, that shouldn't be a problem to add in there, since all you need to do is change the speed of the rotation on a button click.

Let me know if you have any problems with this.

like image 77
Gabi Barrientos Avatar answered Sep 12 '26 09:09

Gabi Barrientos


You can use any kind of carousel to this. You can just basically need to bind a function when click the arrows of the carousel.

For sample the selector for your next button is id="next-button" and the textareas is id="my-textarea"

$('#next-button').click(function(){


    $('#my-textarea').text('The new texts inside the textarea');

});
like image 20
Johndave Decano Avatar answered Sep 12 '26 11:09

Johndave Decano



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!