We can move an image to different location by using buttons. The present location of the image can be collected by using offsetLeft and offsetTop values. To this value we will add a step value which sets the new position of the image. We will assign the new value to image by style property.Working:Write a… Continue reading How to move an image using javascript.
Author: Gopinath Matcharaja
Smooth Modal Popup Plugin with jQuery and CSS3 – needPopup:
Modal popups are used pretty frequently on the web. Some popular uses of them include driving newsletter sign ups, displaying notifications/alerts, and handling register and login forms.needPopup is a lightweight and cross-browser jQuery plugin which allows to display a responsive, nice clean modal popup with CSS3 powered animations on our web site.How to use it:1.… Continue reading Smooth Modal Popup Plugin with jQuery and CSS3 – needPopup:
Add or remove class with JQuery based on vertical scroll
When scrolling down a website, I use JQuery to change the appearance of the <header> element. I like to make it smaller after a certain number of pixels. The best way to accomplish this is to use JavaScript / JQuery to change the class name for the <header> element. To make this script work, you… Continue reading Add or remove class with JQuery based on vertical scroll
Title: How to Use getTime() to Generate Timestamps in JS
In my previous task i used this method. In JavaScript, timestamps are usually associated with Unix time. And there are different methods for generating such timestamps. var timestamp = new Date().getTime(); console.log(timestamp)// 1660926192826 In the example above, we created a new Date() object and stored it in a timestamp variable. We also attached the getTime()… Continue reading Title: How to Use getTime() to Generate Timestamps in JS
Media queries with j-query using match media.
Media Query in JQuery: As you know that Media Query was created in CSS. It is used to create responsive web pages. Means that it can display the web contents & layouts in different size of devices with proper format. So, It is widely used to create a user-friendly & mobile-friendly website.In most cases, developers need… Continue reading Media queries with j-query using match media.
Accordion menus expand and collapse when a user clicks a button.
Description: It’s a great way to not have to show all the info about a topic up front, and instead give users the option to show only what they need. First we need to create Lists. For each list in the menu, we will have two divs – one for the label, the other… Continue reading Accordion menus expand and collapse when a user clicks a button.
Auto dark mode with override selector.
Here, I am implementing a dark mode as Windows and iOS have all introduced dark modes. This will automatically identify systems that are set to dark modes, and apply the enclosed CSS rules. However; even though users may have their system set to dark mode, it may be the case that they prefer the light… Continue reading Auto dark mode with override selector.
Read more and read less button with j-query .
Description: There is all the HTML code for Read Less and Read More Button. We will style our read more and read less buttons by using the body tag selector. Then, We will now style our read more and read less buttons using the class selector. When the user presses the button, the hidden extra… Continue reading Read more and read less button with j-query .
Disable button if specific input fields in steps are empty.
When we create new form , there input text fields and click button will be in it . In that form disable the button if specific ( mandatory) input fields are empty. After filling the input text fields the click button work or enabled . Otherwise it won’t work . For changes we… Continue reading Disable button if specific input fields in steps are empty.
Change (or) Set the maximum upload file size .
To vary the size of the image upload like we can set the image size range of values.if 25mb is the size limit then it will show pop up if we upload a file more than that. Here we used the JS code: