Attempting to load Tabby tabs with javascript
-
Hello there,
I have a page that dynamically generates content using Javascript/jQuery based on which button on that page is clicked. I have it working in such a way that there is a script loaded on the page which has an addEventListener which waits for its button to be clicked. Once the button is clicked, the script pulls HTML from a text file saved on the server into a variable, then updates a <div> on the page with the HTML loaded from the text file.
This all works flawlessly, except that shortcodes saved in the text file do not get parsed and instead just show up as plaintext.
I was able to get around this issue with another shortcode by simply viewing page source and using the generated HTML instead of the shortcode. However, when I tried to do the same with Tabby Responsive Tabs, it did not work. It looks like this is the base-level HTML that your shortcode creates:
<div class="responsive-tabs"> <h2 class="tabtitle">About Us</h2> <div class="tabcontent"> </div><h2 class="tabtitle">Annual Report</h2> <div class="tabcontent"> </div><h2 class="tabtitle">Theater ROcKs</h2> <div class="tabcontent"> </div><h2 class="tabtitle">What's New</h2> <div class="tabcontent"> </div> </div>Is that correct? Can you think of any way that I could use your tabs within my use case? If I’m unable to use them within the loaded HTML, then they won’t be much use to me once I’ve got my site relaunched unfortunately.
The topic ‘Attempting to load Tabby tabs with javascript’ is closed to new replies.