Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

How to apply MOUSEOVER effect to a SHORTCODE

apply HTML to a SHORTCODE [gallery.....]

3:08 pm on Sep 7, 2012 (gmt 0)

New User

5+ Year Member

joined:Sept 7, 2012
posts: 3
votes: 0

I'm Giovanni,
I would like to apply a mouseover effect to display the name of the person at each THUMBNAIL , made by WORDPRES (but I would like to keep the same viewing of the gallery in Fancybox overlay).
My problem is that the grid in the homepage of my website is not generated by individual images on which I could apply the mouseover, but from this shortcode [gallery include = lightbox-61,71,80,87,94,100,108,112,116,121,128,135,139,145,152,159,177,182,186,193,202,222] generated by the plugin GALLERY LIGHTBOX MANAGER, so I do not know how to apply the HTML code for the mouseover to each ID of the shortcode.
I know a bit of HTML and CSS, but nothing about PHP.
Can you advise me what to do?

[edited by: eelixduppy at 8:41 pm (utc) on Sep 8, 2012]
[edit reason] removed personal links [/edit]

12:49 pm on Sept 11, 2012 (gmt 0)


WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 31, 2003
votes: 2

Welcome to WebmasterWorld, Giovanni.

mouseover effects are going to be client-side (JavaScript) rather than server-side code (PHP). You should be able to view the page source after the page has loaded in your web browser and you can code up the mouseover effect you desire based on the rendered HTML code. Unless we are missing something ... ?
8:42 pm on Sept 11, 2012 (gmt 0)

Full Member

5+ Year Member

joined:Mar 22, 2011
votes: 0

This could be done with PHP, but from what I understand of WordPress shortcodes so far, you'd basically need to reimplement the shortcode with your own PHP code which would then insert the necessary HTML and/or JavaScript call.

In my opinion you'd be better off using something like jQuery to attach a mouseover or hover event to the individual thumbnails. Getting the name of the person to display will probably be an issue, though.

11:48 am on Sept 12, 2012 (gmt 0)

New User

5+ Year Member

joined:Sept 7, 2012
posts: 3
votes: 0

Thanks Ryan for your answer.
About your suggestion, how can I attach a mouseover or hover event to the individual thumbnails if the only element that i can see is the ID of the SHORTCODE [gallery include = lightbox-61,71,80...}?
Or you mean that is better to remove that plugin (wich generate the shortcode) an find another solution to display the thumbnails of the gallery?


Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members