If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

jQuery Dynamic Selector

Hi,

I am trying to implement the tinytabs object (https://github.com/knadh/tinytabs) on my site with dynamically added content. It is working fine with static content, but the tabs are not showing up when I add content after the fact.

This is my code to initially load the tabs:
$('#MyTabs').tinytabs({anchor: false});

I understand I have to use jQuery on with dynamic content, but all online examples use the click event with on, and I can't figure out the syntax to use to connect tinytabs to the new content.

I can't sem to wrap my head around this. Thanks for any help getting me pointed int he right direction!

Thanks for the quick reply. I think that's where I'm confused, because I'm not trying to bind a click event to the element, rather I'm trying to attach the tinytabs component to the element. The tab control works great when attaching to static content, just not the new code I inject.
I have read and researched this, but have only found references to click.

probably best to show some code in a new post then, sounds like something CF can help with

i looked at tinytabs, looks to be a very simple tab system, but doesnt show any support for dynamic content. worst case scenario you can always rebind the tabs after your dynamic events occur that can be a pain.