Twenty Twelve
Help - adding this JS (Rollover Text To Change Image ) to page (4 posts)

  1. kpenn
    Posted 3 years ago #

    Want rollover text (also link) to change image once rolled over.

    Found this and worked perfect in dreamweaver (html) but having a hard time in wordpress page. Anyone familiar with a quick / easy resolve?

    - Is there a good JS embed on page plugin?
    - Could someone map out where / how JS needs to be added in header,footer or function? (tried a bunch but...)
    FYI - Yes, using Twenty Twelve theme

    Again, this code works perfect but script not working in wordpress. Appreciate

    function roll(img_name1, img_src1)
    document[img_name1].src = img_src1;
    <li><a href="1.htm" onmouseover="roll('poster', '1.gif')">111</a>
    <li><a href="2.htm" onmouseover="roll('poster', '2.gif')">222</a>
    <li><a href="3.htm" onmouseover="roll('poster', '3.gif')">333</a>
    <p align="center"><img src="1.gif" name="poster"></p>
  2. WPyogi
    Forum Moderator
    Posted 3 years ago #

    Are you using a Child Theme?

  3. kpenn
    Posted 3 years ago #

    Thanks for responding - it's appreciated.

    Yes, I am using a child theme.

    I just came across "Embed Javascript" plugin by Bogdan. So far so good - the images are finally changing when I rollover the text buttons.

    Do you know if using this plugin or any like it would be putting me at risk for future conflicts? Would I be better off with another approach?

    FYI - this only one that seemed to work for me so far BUT it hasn't been updated in over 2 years

    Again, Thanks!

  4. kpenn
    Posted 3 years ago #

    Not sure about this plugin may need another approach - strips <p>,

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic