Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

HTML question - applying classes to IMG

  • 21-02-2011 9:13pm
    #1
    Closed Accounts Posts: 112 ✭✭


    I downloaded the "IMG Mouseover" plugin for my wordpress.

    It should be quite straightforward to apply it to an image, however I am having difficulty.

    Here are the instructions:

    WordPress › IMG Mouseover « WordPress Plugins

    MY GOAL: What I'm trying to do is to have a small image A, that when moused over results in larger image B popping up.
    This allows you to create a simple image mouseover feature by adding properties to an image:
    It understands the following attributes which can be added to the HTML:
    • img.class="mouseover" (activates IMG mouseover for this image)
    • img.oversrc (If specified, this rewrites the image on mouse rollover)
    • img.clicksrc (If specified, this rewrites the image on mouse click)
    • img.noresize (If set, this will make the image have the natural dimensions instead of the dimensions of the original image).
    • a.class="mouseover" (activates A tag as a controller for another image, when clicked a class "selected" is tacked on)
    • a.for (Should be specified to point to target image. Image must be class mouseover)
    • a.for_link (If specified the ID of a link is replaced with this one)
    • a.src (If specified, the click will replace the image with this)
    • a.oversrc (If specified, the click will replace the image mouse rollover with this)
    • a.clicksrc (If specified, the click will replace the image mouse click with this)
    THANKS!

    So I am guessing its something like this, but it didnt work.

    <img img.class="mouseover" src="/pictureA.jpg">


Comments

  • Closed Accounts Posts: 9,700 ✭✭✭tricky D


    Should probably be <img class="mouseover" src="/pictureA.jpg"> not img.class


  • Closed Accounts Posts: 112 ✭✭DeanSmedley


    tricky D wrote: »
    Should probably be <img class="mouseover" src="/pictureA.jpg"> not img.class

    No sorry that don't work.

    This what I currently have, and it don't work:

    Could it be a chmod problem?


  • Closed Accounts Posts: 112 ✭✭DeanSmedley


    Ok, I got it working, Thanks for your help!!


  • Registered Users, Registered Users 2 Posts: 10,245 ✭✭✭✭Fanny Cradock


    Want to tell us how?


  • Closed Accounts Posts: 112 ✭✭DeanSmedley


    It's embarassing actually, but the reason it didnt look like it was working, was because I was using the same image for the img and the mouseover. When I used two different images I realsied that it was changing all along!!


  • Advertisement
  • Closed Accounts Posts: 18,163 ✭✭✭✭Liam Byrne


    It's embarassing actually, but the reason it didnt look like it was working, was because I was using the same image for the img and the mouseover. When I used two different images I realsied that it was changing all along!!

    I'd actually spotted that in the quoted code :

    ....but given that the URLs were "example.com" I thought that was just an oversight in the example given, rather than your original code, and didn't want to seem like a smart-ass.


Advertisement