mQuery for SharePoint 2013 - Netwoven

mQuery for SharePoint 2013

By Matthew Maher  |  Published on August 20, 2012

Netwoven Blog

I was poking around the new Office365 preview and started writing some custom JavaScript tweaks when I found a JavaScript class file called mQuery.js. This was confusing to me, as I had heard from some of the rumors that SharePoint 2013 was going to ship with jQuery out of the box. So I started probing into this new mQuery.js file, and low and behold it looks very similar to jQuery’s event features. Here is the mQuery.js file from their CDN, and here are some functions from the file:

  • addClass
  • css
  • bind
  • removeClass
  • click

So how can you make use of these functions? mQuery uses the no conflict technic that jQuery uses, so instead of your typical jQuery select $(‘#myID’).hasData(); you can use m$(‘myID’).hasData();. This way you can use mQuery you can still use all your jQuery functions that you have already written.

At the end of the day I really hope that Microsoft decides to use jQuery and publishes these custom functions as plugins. But I don’t know how realistic this is, so we might want to start using the built mQuery functions.

By Matthew Maher

Matt Maher is a technical director with Netwoven who has been working with Fortune 500 companies implementing large scale enterprise systems for the last 15 years. Matt is an early member of the Netwoven team and has helped grow Netwoven from it’s infancy to the current stages. Matt is passionate about blending productivity and security to enable modern workplaces. His leadership and expertise have helped companies build secure, highly effective solutions and applications. Matt holds a BS in Computer and Informational Sciences from the University of Massachusetts.

Leave a comment

Your email address will not be published. Required fields are marked *

Unravel The Complex
Stay Connected

Subscribe and receive the latest insights

Netwoven Inc. - Microsoft Solutions Partner

Get involved by tagging Netwoven experiences using our official hashtag #UnravelTheComplex