javascript - Small Image Hover Views Big Image (Not Separate Window, though) -
I want the big image in the hover over the small image view in the same window ...
Can also do
First and foremost, welcome to StackOverflow!
What you are describing is not PHP, instead, the best technique to use for your problem will be a client-side solution, such as Javascript if you have no problem, then I I would like to encourage you to consider using the JavaScript framework to cut down on the development time of different browsers (if you do not already know, you can make them crazy. Can and can drive opportunities).
Due to having a thumbnail to display a large image with Javascript, it is not difficult to consider the following HTML:
& Lt; Div class = "preview" & gt; ... preview will be seen here & lt; / Div & gt;
I'm basically storing large file names in the rel
tag to access it through our JavaScript. Using a popular JavaScript library, we can easily perform a preview operation:
$ (function () {// Add some events when we add our thumbnail $ ("IMG.Joomme "). Hover (function () {// Preview box $ (" Preview ") Add our big image inside. Html ($ (" (lt; img & gt; "). Attr (" src ", $ (This) .attr (" Rel "));}, function () {// Clear our preview box $ (" preview ") .html (" ");});});
In this simple example, we are just using the basic hover method in jQuery to define two actions, for the first time when we mouse on any picture that contains the "zoomMe" class And second, when we leave the same image.
Comments
Post a Comment