Found 10711 Articles for Web Development

What is the difference between `on` and `live` or `bind` in jQuery?

Amit D
Updated on 17-Feb-2020 06:01:22

253 Views

jQuery on() methodThe on( events [, selector ] [, data ], handler ) method binds a handler to an event (like click) for all current − and future − matched element. It can also bind custom events.Here is the description of all the parameters used by this method −events − Event types separated by spaces.selector − A Selector Stringdata − Data to be passed to the event handler in event.datahandler − A function to bind to the event on each of the set of matched elementsExampleYou can try to run the following code to learn how to work with on() method − ... Read More

How to disable a particular jQuery event on a page?

Amit D
Updated on 17-Feb-2020 05:54:34

487 Views

To disable a particular jQuery event, use the jQuery off() method. You can try to run the following code to learn how to disable a particular jQuery event on a page −ExampleLive Demo $(document).ready(function(){     $("p").on("click", function(){         alert("You clicked it!");     });     $("button").click(function(){         $("p").off("click");     }); }); Click me Click above to generate an alert box. Click the below button to remove namespace, which won’t generate an alert box. Remove Event

Using HTML control and SAPUI5 controls and advantages of using UI5 controls over HTML controls

Bhanu Priya
Updated on 04-Oct-2023 14:55:13

281 Views

First of all, let us try to understand what controls are. Controls define the appearance and behavior of screen areas. It consists of Control name. What is SAPUI5? It is a framework used to develop web applications in mobile and desktop where a large collection of JS libraries are present. But these JS libraries cannot be used alone. They have to be integrated into CSS along with JS for developing interactive internet applications. SAP can be customized and also builds its own UI components like, layouts, controls etc. Because of its extensive features we can control and define custom ... Read More

How to submit a form using jQuery click event?

Amit D
Updated on 17-Feb-2020 05:53:22

6K+ Views

To submit a form using jQuery click event, you need to detect the submit event. Let’s submit a form using click event and without using click event.ExampleYou can try to run the following code to learn how to submit a form using jQuery click event −Live Demo $(document).ready(function(){     $(function() {    $('#submit1').click(function(e) {         e.preventDefault();         $("#Demo").submit();     });    $('#submit2').click(function(e) {         e.preventDefault();         $("#Demo").submit();     }); }); });     Team             Submit

How to align two divs horizontally in HTML?

Bhanu Priya
Updated on 04-Oct-2023 14:44:54

6K+ Views

The division tag name itself indicates that it makes divisions, and displays layouts in web pages. The DIV tag can be applied to text, images, navigation bar etc., where a separate section can be created. This tag consists of open and close tags , and both the tags are used together if we want to divide the page. The content can be any type of data or images. DIV tags can be styled with CSS or manipulated with JavaScript, it is easily styled by using the class or id attributes. The DIV tag is called as block-level ... Read More

How to place two divs next to each other in HTML?

Bhanu Priya
Updated on 29-Sep-2023 16:20:55

47K+ Views

DIV tag is nothing but a division tag, the name itself indicates that it makes divisions for the content on the web pages. It helps in separating the data like text, images, navigation bar etc., we can also create particular sections by using the DIV tag. A DIV tag consists of open and close tags , and both these tags are compulsory if we want to divide the page. DIV tags can be styled with CSS or manipulated with JavaScript, it is easily styled by using the class or id attribute. Any sort of data can be placed inside ... Read More

How to set background color in jQuery?

Amit D
Updated on 11-Dec-2019 07:59:07

5K+ Views

To set the background color using jQuery, use the jQuery css() property. We will set background color on mouse hover with the jQuery on() method.ExampleYou can try to run the following color to set background color in jQuery.Live Demo $(document).ready(function(){     $("body").on({         mouseenter: function(){             $(this).css("background-color", "gray");         },       });     }); Move the mouse pointer on the page to change the background color.

How to change the background color using jQuery?

Amit D
Updated on 11-Dec-2019 08:04:36

9K+ Views

To change the background color using jQuery, use the jQuery css() property. We will change background color on mouse hover with the jQuery on() and css() method. ExampleYou can try to run the following code to learn how to change background color using jQuery:Live Demo $(document).ready(function(){     $("body").on({         mouseenter: function(){             $(this).css("background-color", "gray");         },                   mouseleave: function(){             $(this).css("background-color", "red");         },                 dblclick: function(){             $(this).css("background-color", "yellow");         }     }); }); Double click and move the mouse pointer to change the background color.

How to remove underline from text hyperlink using jQuery?

Amit D
Updated on 11-Dec-2019 08:05:30

572 Views

To remove underline from text hyperlink on hover using jQuery, use the jQuery css() property. The color text-decoration property is used with value none.ExampleYou can try to run the following code to learn how to remove underline from text hyperlink:Live Demo           jQuery Text Decoration                              $(document).ready(function() {             $('a').hover(                                function () {                   $(this).css({"text-decoration":"none"});                });                          });                    a {            text-decoration: underline;          }                         Demo text                

How to underline a Hyperlink on Hover using jQuery?

Amit D
Updated on 11-Dec-2019 08:17:41

468 Views

To underline a hyperlink on hover using jQuery, use the jQuery css() property. The color text-decoration  property is used.ExampleYou can try to run the following code to learn how to underline a hyperlink on hover:Live Demo           jQuery Hyperlink Decoration                              $(document).ready(function() {             $('a').hover(                                function () {                   $(this).css({"text-decoration":"underline"});                });                          });                   a {            text-decoration: none;          }                         Demo text                

Advertisements