Advertisement
faddah

javascript not working in enhanced text widget for wordpress

Feb 13th, 2013
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script language="javascript" type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js">
  2. <script language="javascript" type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/jquery-ui.min.js">
  3. <script language="javascript" type="text/javascript">
  4. $(document).ready(function () {
  5. var words = new Array();
  6. words[0] = "“Your deepest presence is in your every small contracting and expanding. The two as beautifully balanced and coordinated as birdwings.” -Rumi";
  7. words[1] = "“What is this precious love and laughter budding in our hearts? It is the glorious sound of a soul waking up.” ~Hafiz";
  8. words[2] = "“No matter where you go... there you are!” -Buckaroo Banzai";
  9. words[3] = "“Zaphod\'s... just this guy, you know?” -Douglas Adams\' The Hitchhiker\'s Guide To The Galaxy";
  10. words[4] = "“Monicka is just the bestest licensed massage therapist, ever!” — a very smart, satisfied customer";
  11.  
  12. function changeRecommendQuote() {
  13.  
  14. var rand = Math.floor(Math.random() * words.length);
  15.  
  16. var recommendElement = document.getElementById("recommendation");
  17.  
  18. recommendElement.innerHTML = words[rand];
  19.  
  20. $('#recommendation').fadeIn(1500).delay(4000).fadeOut(1500);
  21.  
  22. }
  23.  
  24. changeRecommendQuote()
  25.  
  26. setInterval(changeRecommendQuote,7250)
  27.  
  28. });
  29. </script>
  30. <p style="display:none;" id="recommendation">? ?</p>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement