The following is an example showing the usage of Grid for multiple devices −Example Live Demo Bootstrap Example Hello, world! Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut ... Read More
jQuery.conflict() method allows you to use multiple frameworks, while using jQuery. The $ sign is used for jQuery, but what if other frameworks also use the same $ sign; this may create issues and conflict. To avoid this, jQuery issued the noConflict() method. The method releases the $ sign to be used my other JavaScript frameworks. Use jQuery with the name, jQuery.ExampleYou can try to run the following code to learn how to work with the noConflict() method −Live Demo $.noConflict(); jQuery(document).ready(function(){ jQuery("button").click(function(){ jQuery("h3").text("jQuery works perfectly"); }); }); ... Read More
To create a jQuery plugin, first create a file named jquery-demoplugin.js with the following code. This is our plugin code. Here, demoplugin is the name of our plugin. You can add any name to your custom plugin −(function ( $ ) { $.fn.demoplugin = function( options ) { var web = $.extend({ name: 'example' }, options ); return this.append('Website: ' + web.name + '.com'); }; }( jQuery ));Now, to load it, add to the HTML file, new.html − $( document ).ready(function() { $( '#content ).demoplugin(); });
An offset is used to push columns over for more spacing. To use offsets on large displays, use the .col-md-offset-* classes. You can try to run the following code to learn how to work with offset columns in Bootstrap −Example Live Demo Bootstrap Example Heading One This is demo text. This is demo text.
The purpose of wrapping is to a namespace and control the visibility of member functions. It wraps the code inside a function scope and decreases clashing with other libraries. This is what we call Immediately Invoked Function Expression (IIFE) or Self Executing Anonymous Function.SyntaxHere’s the syntax −(function() { // code })();As you can see above, the following pair of parentheses converts the code inside the parentheses into an expression −function(){...}In addition, the next pair, i.e. the second pair of parentheses continues the operation. It calls the function, which resulted from the expression above.
Yes, you can use multiple versions of jQuery on the same page. To avoid any kind of conflict, use the jQuery.noConflict() method. jQuery.noConflict() method allows you to use multiple frameworks, while using jQuery. Other JavaScript frameworks include Ember, Angular, Backbone, etc.The $ sign is used for jQuery, but what if other frameworks also use the same $ sign; this may create issues and conflict. To avoid this, jQuery issued the noConflict() method. The method releases the $ sign to be used my other JavaScript frameworks. Use jQuery with the name, jQuery.With this, you can also use multiple versions of jQuery ... Read More
The shadowBlur property of the HTML canvas is used to set the blur level for shadows. The default value is 0. The element allows you to draw graphics on a web page using JavaScript. Every canvas has two elements that describes the height and width of the canvas i.e. height and width respectively.Following is the syntax −ctx.shadowBlur=num;Above, the num represents the blur level for the shadow.Let us now see an example to implement the shadowBlur property of canvas −Example Live Demo var c = document.getElementById("newCanvas"); var ctx = c.getContext("2d"); ctx.shadowBlur = 20; ... Read More
jQuery.noConflict() method allows you to use multiple frameworks, while using jQuery. Other JavaScript frameworks include Ember, Angular, Backbone, etc.The $ sign is used for jQuery, but what if other frameworks also use the same $ sign; this may create issues and conflict. To avoid this, jQuery issued the noConflict() method. The method releases the $ sign to be used my other JavaScript frameworks. Use jQuery with the name, jQuery.You can try to run the following code to learn how to use multiple JavaScript libraries along with jQuery − var $x = jQuery.noConflict(); // ... Read More
Bootstrap Grid System provides the following strategy for structuring content on a web page −ContentDetermine what is most important. LayoutDesign to smaller widths first.Base CSS address mobile device first; media queries address for tablet, desktops.Progressive EnhancementAdd elements as screen size increases.
To create a jQuery plugin, firstly create a file named jquery-myplugin.js with the following code. This is our plugin code. Here, myplugin is the name of our plugin.(function ( $ ) { $.fn.myplugin = function( options ) { var web = $.extend({ name: 'tutorialspoint' }, options ); return this.append('Website: ' + web.name + '.com'); }; }( jQuery ));Now, to load it, add to the HTML file, new.html: $(document).ready(function() { $('#myclass').myplugin(); }); Run the above code and you can see the text is visible, which shows your custom plugin is working correctly.
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP