[SOLVED] Javascript not working in widget sidebar
Hi -
I'm trying to set up a tabbed menu on the sidebar. Tried a few others, including Tabbed Widgets and Section Widget, and came across the same stone wall: javascript doesn't appear to work in the sidebars. I've deactivated all my other plugins in case one of them may be causing the problem, but no.... Currently, I'm playing with NetTut's jQuery Tabbed Interface example. My test page shows the tabbed menu working in the main content section of the post. However, the same code in the text widget on the same page doesn't work (although the CSS works fine!). I've got this test page going on 2 separate websites, both using Wordpress 2.9.2 and Atahualpa 3.4.6. Apart from the plugins that I've tried, this is my second attempt at doing a tabbed menu the hard way. I've run out of ideas of why they don't work. Please help! Thank you for your help in advance! |
try this, use this in the CSS Inserts
HTML Code:
div#tabvanilla { |
Hi Jugglehead -
Thanks for your quick reply. It fixed the problem about the tab titles themselves - so that they now display on one line. For the tab content.... no joy. I'm using the Chrome Developer Tools (right-click on the element within Chrome, and select Inspect Element). For the tab menu on the post content, I notice that the javascript adds various classes to the elements, including 'ui-tabs-selected', 'ui-tabs-nave', ui-tabs-hide'. However, the tab menu on the sidebar doesn't get the same treatment. |
Have you been making changes to the css.php?
Please set your CSS to Internal and CSS: Compress to NO at ATO->Configure CSS & JS |
This is my D-O-H-! moment.:o
Everything works fine now. Nothing was wrong with the Javascript or CSS or widget sidebar. I'm learning to write plugins using wp_enqueue_script and wp_enqueue_style, and I was trying to be clever and restrict the code to a particular page ie if (is_single('47')). For some reason, the widget sidebar didn't consider itself to be part of that particular page. I think that's what happened because all worked fine after I changed it to if (!is_admin()). Thanks very much for your help and quick response, Jugglehead! Much appreciated. |
All times are GMT -6. The time now is 03:16 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.