Backbone.js $ Utility
Backbone.js $ Utility is useful when we have multiple jQuery. It is used to specify the particular object as its DOM or AJAX library.
Syntax:
Backbone.$ = $
Properties: This utility cannot takes any parameters.
Example 1: In this example, we will illustrate the Backbone.js $ Utility. Here we will define the utility function default ajax library.
HTML
<!DOCTYPE html> < html > < head > < title >BackboneJS $ Utility</ title > type = "text/javascript" > </ script > < script src = type = "text/javascript" > </ script > < script src = type = "text/javascript" > </ script > </ head > < body > < h1 style = "color: green;" > GeeksforGeeks </ h1 > < h3 >BackboneJS $ Utility</ h3 > < script type = "text/javascript" > Backbone.$ = $; console.log(Backbone); </ script > </ body > </ html > |
Output:
Backbone.js $ Utility
Example 2: In this example, we will use an object as an AJAX library property.
HTML
<!DOCTYPE html> < html > < head > < title >BackboneJS $ Utility</ title > < script src = type = "text/javascript" > </ script > < script src = type = "text/javascript" > </ script > < script src = type = "text/javascript" > </ script > </ head > < body > < h1 style = "color: green;" > GeeksforGeeks </ h1 > < h3 >BackboneJS $ Utility</ h3 > < script type = "text/javascript" > Backbone.$ = { VERSION : '1.1.0', emulateHTTP : true , emulateJSON : true }; console.log(Backbone.$); </ script > </ body > </ html > |
Output:
Backbone.js $ Utility
Reference: https://backbonejs.org/#Utility-Backbone-$
Please Login to comment...