Link to home
Create AccountLog in
Avatar of Bruce Gust
Bruce GustFlag for United States of America

asked on

How to get a mouseover and a click on the "data-toggle" link

Here's my code:

@foreach($videos as $video)
								<tr>
									<td><a data-toggle="modal" href="#video_player-{{ $video->id }}">{{ $video->title }}</a></td>
									<td style="text-align:center;"><a href="{{ url('/admin/show/video/' .$video->id) }}">edit</a> | <a data-toggle="modal" href="#deletePostModal-{{ $video->id }}">delete</a></td>
								</tr>
							@endforeach			

Open in new window


Bottom line: When the user clicks on the title of the video they get a popup that allows them to view the actual file.

I want to incorporate another feature, however, in that when the user hovers over the video title, they get a tooltip that lets them see the thumbnail associated with that file.

I can see how it's done, at least as far as being able to view some simple text like this:

https://www.w3schools.com/bootstrap/bootstrap_tooltip.asp

But how do I get two different functionalities to exist side by side with one being activated with a mouseover, the other with a click - both of which, apparently require the "data-toggle" dynamic?

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of Chris Stanyon
Chris Stanyon
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of Bruce Gust

ASKER

Go, dog, go!