Skip to content
WJunction - Webmaster Forum

Help with image hover

Status
Not open for further replies.

cgworld

Experienced Member
566
2010
9
Hello Wj

i want to make something so when i go over the topic links the first image which is posted in the topic to be shown in a small box over the mouse cursor, for example this are the topic links :

2cxx7vn.jpg



I have seen this on many places but i cant remember where it was exactly so i don't have a link so you can understand what i want.
Any idea on how to do it ?

Thanks
 

5 comments

it can be done.
just write a function which pull the first image from the post .
use css properties to make it display on hover..
 
I imagine you'de need to use file_get_contents to get the contents of the file, then strip away everyhthing but the content of the post. The use regex to find the first <img> tag (and whats between it, then allyou need to do is get that function to return the path of that image tag.
 
Status
Not open for further replies.

About the author

C
Experienced Member · Joined
566
Messages
9
Reactions
18
Points
Grow your business

Advertise on WJunction

Connect with an established international community of webmasters, hosting providers, developers and online entrepreneurs.

  • Premium & Premium+ Sticky
  • Dedicated section banners
  • Site-wide banner advertising
Explore advertising options
Back
Top Bottom