Home JS special effects jQuery effects jQuery long press the image to display the image code

jQuery long press the image to display the image code

jQuery long press the image to display the image code

jQuery long press the image to display the image code

代码片段:

function showDh(){  
        if(stepNum > step){  
            if(start >= end){  
                return;  
            }else{  
                start++;  
                stepNum = 1;  
                pointMsg = setImgMsg(start);  
            }  
            return;  
        }else if(stepNum == step){  
            setTimeout(function(){  
                console.log(step);  
                $('#showImg2 , #showImg1').removeClass('showDh');  
            },100);  
        }else if(stepNum == 1){  
            $('#showImg2 , #showImg1').addClass('showDh')  
        }  
        console.log(stepNum , start , end);  
        $('#showImg2').css({'width':pointMsg.maxStartW - stepNum * pointMsg.maxStepW,'left':pointMsg.maxStartX - stepNum * pointMsg.maxStepX,'top':pointMsg.maxStartY - stepNum * pointMsg.maxStepY});  
        $('#showImg1').css({'width':pointMsg.minStartW - stepNum * pointMsg.minStepW,'left':pointMsg.minStartX + stepNum * pointMsg.minStepX,'top':pointMsg.minStartY + stepNum * pointMsg.minStepY});  
        stepNum ++;  
    }  

Disclaimer

All resources on this site are contributed by netizens or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this site are for learning reference only. Please do not use them for commercial purposes. Otherwise, you will be responsible for all consequences! If there is any infringement, please contact us to delete it. Contact information: admin@php.cn

Related Article

How to solve the problem of image background display in jQuery How to solve the problem of image background display in jQuery

25 Feb 2024

Title: Methods to deal with jQuery image background display problems In front-end development, we often encounter situations where jQuery is used to control image background display. However, sometimes you encounter some problems, such as abnormal picture display, size distortion, etc. This article will introduce some methods to deal with jQuery image background display problems and provide specific code examples. Problem Analysis When using jQuery to set the image background, common problems include the following: image size distortion, incomplete image display

How to use the image display plug-in highslide.js in jQuery How to use the image display plug-in highslide.js in jQuery

02 Jun 2018

This time I will show you how to use the image display plug-in highslide.js in jQuery. What are the precautions for using the image display plug-in highslide.js in jQuery? The following is a practical case, let's take a look.

jquery changes the image QR code path but does not display it jquery changes the image QR code path but does not display it

18 May 2023

With the vigorous development of the mobile Internet, QR codes have become a very popular method of information transmission in modern society. In web development, we often need to use jQuery to operate elements in web pages, including the path of QR code images. However, in actual operation, we often encounter a difficult problem, that is, the QR code image cannot be displayed after changing the path. This article will give you a detailed introduction to the reasons and solutions for jQuery changing the QR code path of images not to be displayed. 1. Problems manifested in web development, we often need to

jquery preview image to display the actual size when the mouse is placed_jquery jquery preview image to display the actual size when the mouse is placed_jquery

16 May 2016

The example introduced in this article is a preview image implemented by jquery. When the mouse is placed on it, the actual size is displayed. Interested friends can learn from it.

What to do if jquery does not display the image background What to do if jquery does not display the image background

07 Feb 2023

jquery does not display the image background because the path is incorrect. The solution is: 1. Open the corresponding js file; 2. Pass "let src='clock/img/afternoon.png';them_icons.css('background','url ('+src+')')" method to reset the background image.

JQuery method to move the mouse to a small image to display the effect of a large image_jquery JQuery method to move the mouse to a small image to display the effect of a large image_jquery

16 May 2016

This article mainly introduces the method of moving the mouse of JQuery to a small picture to display the effect of a large picture, involving jQuery mouse events and graphics operation skills. Friends in need can refer to the following

In the mini program, you can select a preview image and long-press to delete the image at the same time. In the mini program, you can select a preview image and long-press to delete the image at the same time.

10 Aug 2018

The content of this article is about the code that allows you to select preview images and delete images by long pressing in the mini program. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

How to change the background image of a web page using JQuery code How to change the background image of a web page using JQuery code

06 Apr 2023

With the modern web design trend, background images play an important role in web page production. It can be used as an important element of the web page to provide users with a better visual experience. In this article, we will explore how to change the background image of a web page using JQuery code. JQuery is a popular JavaScript library that simplifies JavaScript programming and provides many predefined functions to easily manipulate the DOM, handle events and create animations, etc. By using JQuery we can

 
演示
jquery scroll left and right focus image banner image to display up and down page buttons after the mouse passes_jquery

16 May 2016

jquery scrolls the focus image banner image left and right, and the mouse moves over to display the upper and lower pages. It is suitable for pages with relatively large width and height. A demo is attached. Interested friends can refer to the following

See all articles See all articles

Hot Tools

jQuery2019 Valentine's Day Confession Fireworks Animation Special Effects

jQuery2019 Valentine's Day Confession Fireworks Animation Special Effects

A very popular jQuery Valentine's Day confession fireworks animation special effect on Douyin, suitable for programmers and technical geeks to express their love to the girl they love. No matter you choose to be willing or not, you have to agree in the end.

layui responsive animated login interface template

layui responsive animated login interface template

layui responsive animated login interface template

520 Valentine's Day confession web animation special effects

520 Valentine's Day confession web animation special effects

jQuery Valentine's Day Confession Animation, 520 Confession Background Animation

Cool system login page

Cool system login page

Cool system login page

HTML5 tape music player-CASSETTE PLAYER

HTML5 tape music player-CASSETTE PLAYER

HTML5 tape music player-CASSETTE PLAYER