Shaun Mccran

My digital playground


Forcing the dollar ($) Namespace within your JQuery functions

Whilst documenting some Open Source platforms for an upcoming project I found that several of the larger more prominent Open Source software solutions perform some subtle tweaks to included JavaScript libraries. In this case JQuery.

This is a short post on ho to ensure that the $ character always represents the JQuery library in your framework.

Drupal and Wordpress have a habit of controlling resource libraries through their own interface layer. This means that within a Drupal framework the $ reference no longer points to the JQuery library as is the default.

You can force this with the no conflict code found here, or alternately you can wrap any of your own functions or plugins with a small piece of code that re-references the dollar ($).

view plain print about
1(function ($) {
3 // Original JavaScript code.

Pretty simple, but probably a good thing to do to any JQuery plugins you write.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
sunny's Gravatar I wanted to learn Javascript and so that I have tried many resources to get the sufficient information. I think this website is very much enough for my requirements. So thank you for helping me to get the desired contents.
# Posted By sunny | 04/06/2015 09:18
Farrah's Gravatar These open source programs of upcoming projects are very essential in modifying the most of the software solutions. I suppose to use them for my blog. Trying to incorporate the new style of technology.
# Posted By Farrah | 26/06/2015 22:38
replica watches's Gravatar Additionally, replicas of Gucci handbags do not authority the brand on all in the zips; this actually is one affair that anniversary of the originals have. Also, abreast to the aural in the originals you can possibly access the adeptness to locate advice and data on how the bag was made, aswell to the breadth by which it actually was manufactured. Again, in accident you cannot locate this advice and data it is safe and assume to say which you are searching at a replica of the Gucci handbag.All in all, akin of superior and backbone are essentially abundant bigger whenever you acquirement an 18-carat Gucci bag. The actuality in the accomplish any aberration could possibly be the actuality that it could possibly be harder to actuate an 18-carat from the replica of the Gucci handbag. But in accident you stick to the account aloft you have to access appropriately in your adjustment to award whatever you are after. Just assure which you authority your time through the affairs process, aswell it is best to not plan into any problems. In abreast society, purchasing reproduction watches has about-face into a trend. Men and women access them not alone for accustomed use but aswell for every day chichi look. Replica watches are the exact copies of the aboriginal models with commensurable actualization and almost functions. On the added hand, the a lot of cogent acumen that stimulates association to advance in these affected horologes refers to the aggressive rates. Distinct from the 18-carat timepieces awash at ample charges, alike timepieces are abundant beneath pricey. Nowadays, you can acquisition assorted techniques to access a alike watch. You are able to access it online or offline. Which way to use? It depends in your needs. Whichever address you will assuredly choose, you will acquisition something you have to buck in apperception afore agreement an order. Firstly, you should authority a absolute attitude appear affected watches. In the eyes of absolutely a few humans today, "replica" is agnate to "fake". In fact, it is not absolutely true. The top superior of a watch relies on the breeding products. Alone if they are crafted from inferior resources, these apery watches are accepted as "fake watches". Nevertheless, the top superior alike watches are fabricated of accomplished supplies, breeding them attainable in accustomed utilization. Secondly, you should access the archetypal based on your own will charge and bread-and-butter status. Since there are so a lot of kinds of reproduction watches accessible aural the market, assorted models are awash at assorted affairs prices.
# Posted By replica watches | 08/08/2015 00:45
Back to top