WordPress.org

Ready to get started?Download WordPress

Forums

[Plugins: Enhanced Text Widget] JavaScript in Enhanced Text Widget not working (2 posts)

  1. faddah
    Member
    Posted 1 year ago #

    hi,

    our set-up is a self-hosted (rackspace.com) multisite in wordpress 3.5.1, using a child derivative of the “sight” theme from wpshower.com and the enhanced text widget version 1.3.3.

    we want to put some javascript in the enhanced text widget and have it run with the regular html in there. the javascript and html we put in the enhanced text widget can be seen in pastebin, here —

    javascript not working in enhanced text widget for wordpress pastebin

    this javascript/jQuery code works just fine in regular javascript and html, as can be seen in my github repository of these files, here —

    github javascript/jQuery fader text example

    it should randomly pick one of the quotes in the text string array and fade that quote in and out between the html/css <p...> selectors to which i gave the css id #recommendation. however, the code never runs in the widget and i the text strings are never seen, even though it works just fine up on my github, as i've shown above.

    i cannot figure out why this is not working. we got the enhanced text widget as it held the promise of running javascript code. any help in making this work would be most appreciated.

  2. bostondv
    Member
    Posted 1 year ago #

    In your pastebin sample the script includes are missing the closing tag.

    <script language="javascript" type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
    <script language="javascript" type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/jquery-ui.min.js"></script>

    It works for me when fixing that error.

Topic Closed

This topic has been closed to new replies.

About this Topic