Home > javascript

Difference between JavaScript remove() method and CSS display none

This article provides information regarding the use of the remove() method in JavaScript and display: none property in CSS. remove() – JavaScript I am assuming you have an HTML page. Create div Element in the body tag, as shown below, I am passing this keyword (which means current Element). [crayon-67370d956fbc8382350186/] Inspect elements HTML view Add

This Article is TAGGED in , , , , . Read more

How to Create HTML Element using JavaScript?

This article provides information about creating HTML Elements dynamically instead of static HTML Elements using JavaScript. You can create HTML Element dynamically using document.createElement() method. It takes parameter as tag Name. Syntax [crayon-67370d9570001046079376/] In createElement() method it takes first parameter as tagName or nodeName to create Element. An optional ElementCreationOptions object, In createElement() method it

This Article is TAGGED in , , , . Read more

Protractor: Script execution using custom command

This article will cover below points:  Use of custom command instead of protractor along with user defined options to control the execution of script. Protractor script execution for different test suites using different configuration files i.e. In regression test suite we will execute all spec files In smoke test suite we execute

This Article is TAGGED in , , , , , , . Read more

17 Useful jQuery Tricks and Best Practices

In the previous article, we learned about Common jQuery Ajax methods and options. In this article, we will cover the some general Do's and Dont's or Best Practices in jQuery, which is helpful to increase your page speed and will optimize code. jQuery is the most popular client-side library. It has

This Article is TAGGED in , , , , , , . Read more

SharePoint Online Search using Rest API with query text?

Hello  Today we will cover SharePoint Search with REST API. In this tutorial, I will explain SharePoint Search API with the Query Text parameter. In my next article, I will cover Query parameters with different data types like SelectProperties, RefinementFilters, Properties etc. The Search REST service supports both HTTP POST and HTTP GET

This Article is TAGGED in , , , , , , , . Read more

event.preventDefault() vs event.stopPropagation() vs return false

This article provides the information how can we prevent default behavior/action of an element in jQuery. Sometimes we need to stop/prevent element default action when a certain event is fired using jQuery.Event object methods we can achieve that event. We will see all three methods with a DEMO  event.preventDefault() event.preventDefault();  method is stop default

This Article is TAGGED in , , , , . Read more

DOM traversing & manipulating in JavaScript

Hello everyone, in this post we will discuss about following points on Document Object Model (DOM). What is DOM? DOM traversing DOM manipulating What is DOM? The Document Object Model (DOM) is a programming API for HTML and XML. API specification defined by the World Wide Web Consortium (W3C). DOM represents how to write HTML and

This Article is TAGGED in . Read more

What is difference offset() and position()

Hello everyone, in this post we will discuss about difference between offset() and position() with example. offset() The offset() method set or returns the offset coordinates (current position) for the selected elements, relative to the document. offset() returns an object containing the properties top and left coordinate value. When positioning a new element on

This Article is TAGGED in . Read more

What is Method Chaining in JavaScript

Hello everyone, in this post we will discuss about following points on Method Chaining What is Method Chaining? Pros and Cons of Method Chaining What is method chaining? Method chaining is technique that allows to write several methods on jQuery selection in sequence in a single code statement. jQuery relies heavily on chaining. This makes it easy

This Article is TAGGED in . Read more