Show/hide javascript not working in WP 2.8 widgets
-
I’m using a simple javascript to show/hide some content in the widget section of wordpress 2.8. But the show hide functionality doesn’t work at all. Below is the code I used in widget:
Toggle
<div id=’div1′ style=’display:none’>Show Me…..Hide Me…..</div>
<script>
function toggleME(){
var div1 = document.getElementById(‘div1’);
if (div1.style.display == ‘none’) {
div1.style.display = ‘block’;
} else {
div1.style.display = ‘none’;
}
}
</script>You can also download a sample plugin here to test with:
http://www.maxblogpress.com/temp/widget2.8.zipAnyone has a fix or is this a bug in WP 2.8?
The topic ‘Show/hide javascript not working in WP 2.8 widgets’ is closed to new replies.