WordPress.org

Ready to get started?Download WordPress

Forums

Can a script run in a widget? (4 posts)

  1. jkendo
    Member
    Posted 5 years ago #

    I am using the "text" widget (instead of the "links" widget) for my blogroll. The length of it is getting out of control so I found a script that makes a cool accordion-like effect that expands and contracts on a mouse click. But for the life of me, I can't seem to get it to work. I understand the html and css parts of it, but it calls for javascript using jquery. I've placed the javascript code in my header.php and sidebar.php (not at the same time) but to no avail. Is there a plug-in that allows for javascript to be placed directly in the widget with the html code? That would be the best. But if not, then how do I get the widget to "call" for that script? I've noticed other javascripts in my header.php. Could they be competing with each other so that is why is doesn't work? Thanks.

    my website http://www.mydogshavefleas.com/fleasblog
    website of the script I'm trying to use http://roshanbh.com.np/2008/06/accordion-menu-using-jquery.html

  2. snackd
    Member
    Posted 5 years ago #

    this is similar to the sort of side nav i'm looking for, for pages on my site. did you figure out how to implement it? or anyone else know of a good accordion side menu (plugin?)? thanks

  3. Shane G
    Member
    Posted 5 years ago #

  4. snackd
    Member
    Posted 5 years ago #

    wow, that's a good hack, shane. sure is a hack though. isn't there an off-the-shelf solution for this sort of menu behavior?

Topic Closed

This topic has been closed to new replies.

About this Topic