Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   javascript not working in widget in wordpress (http://forum.bytesforall.com/showthread.php?t=23174)

vj78 May 1, 2015 09:31 PM

javascript not working in widget in wordpress
 
i have the javascript that is working in html file.

But it does not work in widget.



-----

<script type="text/javascript">
var paragraph1 = '[awesome-weather location="Chelsea" units="F" size="tall" forecast_days="3" custom_bg_color="grey" inline_style="width: 150px; margin: 0px; float: left;"]'
var paragraph2 = '[awesome-weather location="Howell" units="F" size="tall" forecast_days="3" custom_bg_color="grey" inline_style="width: 150px; margin: 0px; float: left;"]'
var paragraph3 = '[awesome-weather location="spring arbor" units="F" size="tall" forecast_days="3" custom_bg_color="grey" inline_style="width: 150px; margin: 0px; float: left;"]'


</script>
<p id="demo"></p>

<script type="text/javascript">
var step = 1;


function slideit() {
document.getElementById("demo").innerHTML = eval("paragraph" + step );

if (step < 3)
step++;
else
step = 1;
setTimeout("slideit()", 2500);
}


slideit();



</script>

juggledad May 2, 2015 04:18 AM

1) what version of atahualpa and wp?
2) what type of widget are you using?
3) have you disabled all plugins?
4) have you tried swapping to another theme to see if it works?
5) have you tried googling 'Wordpress jscript widget'


All times are GMT -6. The time now is 02:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.