- Original Poster
- #1
Well, it is to me at least.
I have some JavaScript code which is included into my PHP index file with a <script> command. This takes the <ul> and <li> tags which create lists and then turns them into drop-down menus which I use in my main menu.
However, I'm using a Wordpress blog, and no matter what I do, the widgets in the side bar construct themselves using <ul> and <li> tags, which then turn into drop-down menus due to the JavaScript. This basically messes the whole thing up.
What I need to be able to do is make the JavaScript apply only to <ul> and <li> tags in a particular div, such as the header or menu div, whilst leaving the list tags in the rest of the page alone.
Any tips?
I have some JavaScript code which is included into my PHP index file with a <script> command. This takes the <ul> and <li> tags which create lists and then turns them into drop-down menus which I use in my main menu.
However, I'm using a Wordpress blog, and no matter what I do, the widgets in the side bar construct themselves using <ul> and <li> tags, which then turn into drop-down menus due to the JavaScript. This basically messes the whole thing up.
What I need to be able to do is make the JavaScript apply only to <ul> and <li> tags in a particular div, such as the header or menu div, whilst leaving the list tags in the rest of the page alone.
Any tips?