I am seeking assistance with my website project, which involves providing users with download links to movies.
However, I am struggling to make the preview_block div(id) appear when the mouse hovers over the movie_block div(id). Additionally, I am having difficulty getting the preview_block div to follow my mouse when hovered.
Furthermore, I am looking to implement an AJAX request on the preview_block div to retrieve information about the movie being hovered over.
Below is the code snippet:
For a simpler example, check out this fiddle: https://jsfiddle.net/o4xcb9m0/1/
<!DOCTYPE html>
<html>
<head>
<link href="includes/styles.css" />
</head>
<body>
<div class="">
<div id="preview_block" style="display:none"><p>test</p></div>
<table>
<!-- -->
<tr>
<td>
<a href="download-link"><span id="movie_block"><img src="image-link" alt="<?php echo $movieNameList->data->movies[0]->title; ?>" /></span></a>
<br>
<a href="download-link">Movie Name</a>
<br>
</td>
<td>
<a href="download-link"><span id="movie_block"><img src="image-link" alt="<?php echo $movieNameList->data->movies[0]->title; ?>" /></span></a>
<br>
<a href="download-link">Movie Name</a>
<br>
</td>
</tr>
<!-- -->
<tr>
<td>
<a href="download-link"><span id="movie_block"><img src="image-link" alt="<?php echo $movieNameList->data->movies[0]->title; ?>" /></span></a>
<br>
<a href="download-link">Movie Name</a>
<br>
</td>
<td>
<a href="download-link"><span id="movie_block"><img src="image-link" alt="<?php echo $movieNameList->data->movies[0]->title; ?>" /></span></a>
<br>
<a href="download-link">Movie Name</a>
<br>
</td>
</tr>
</table>
</div>
<script src="includes/scripts.js"></script>
</body>
</html>