vtimbuc / bootstrap-responsive-tabs

"Bootstrap Responsive Tabs" is a simple jQuery plugin that switches the default bootstrap tabs to accordions on the viewports that you choose to.
http://vtimbuc.github.io/bootstrap-responsive-tabs/
35 stars 37 forks source link

Button loses Clicked event when is accordeon #1

Closed nikitul closed 9 years ago

nikitul commented 10 years ago

One of my tabs contain a form and a panel with panel footer and inside of my panel footer a button . I attached a click event to the button. When I resize the window and the tab turns into accordion, the button loses his event. When I resize it back to tab... the event is working

Here is the fiddle: http://jsfiddle.net/vwmgj9ap/

All regards

vtimbuc commented 10 years ago

I will take care of that.

nikitul commented 10 years ago

Thank you very much....

vtimbuc commented 10 years ago

Hi @nikitul,

That's not an issue with the script, your script is not working because the content is being duplicated to be created the accordion. Follow this solution, it's what you need to do as well http://stackoverflow.com/questions/10317552/copy-html-and-preserve-events

Anyways, I will update this script with a much better version, that does not duplicate the content. I will try to have it done today or tomorrow.

vtimbuc commented 10 years ago

@nikitul I've updated the plugin, the content is no longer being duplicated, take a look.

nikitul commented 10 years ago

Thank you very much...

I tried to make it work but... I failed.. I changed the version of jQuery script to 2.1, and your script , but now is all messed up. http://jsfiddle.net/vwmgj9ap/2/

I'm kind of a rookie ...

I tried myself to combine the tab and collapse components into one. http://jsfiddle.net/yu5qm4y5/16/

Now remains the javascript part... to synchronize them (when I click on tab to make active the accordion and so on).

If this helps, please use it.

Thank you for your time.

vtimbuc commented 10 years ago

@nikitul I've created a new fiddle http://jsfiddle.net/r40qvmww/embedded/result/ .

nikitul commented 9 years ago

Hello, Sorry for my late response... I was out of my desk for a few days...

I've tried your fiddle and it works with a form inside http://jsfiddle.net/r40qvmww/2/ but... When I tried to use it with rows and columns - is not working properly ... as a tab-accordeon Try my fiddle (same code as yourse but inside of a row) http://jsfiddle.net/vwmgj9ap/3/

Thank you for spending your time on this...