jQuery Dynamic Selector
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:
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!
reading the api always helps me : http://api.jquery.com/on/
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.
I know I'm missing something here, but just can't find it.
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.
I think the rebind functionality is what I'm missing. Rather than go down that path, I think I'll look for a way to create the tabs statically, and only inject the remaning dynamic code as necessary.
Thanks for helping me clarify!