This one i tried my previous task its working properly. When we have links on your page but you want to open them in a new tab (when visitors are navigating to another website).Do we need the class to be evaluated at the time of the click, or can the the link be flagged to… Continue reading Get an element by class and make it open in a new tab
Author: Gopinath Matcharaja
How to allow Limit character input in the textarea including count.
We create an input text area with a given maxlength and then use jQuery code to limit the characters. First, we set the max limit and then use keyup() method to reduce the textarea character limit by 1 when we click the button and display the count on the screen. Syntax code :
Title : Looping Horizontal Scroll:
Description: Horizontal scrolling is a page navigation method in which the user scrolls left and right to reveal content from the sides of the window or container.The scroll wheel causes the page to move horizontally across the screen rather than vertically. How to use:In this example, I’ve created a <div> container element with a width of 500… Continue reading Title : Looping Horizontal Scroll:
How to move an image using javascript.
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.
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.