1590 Views
2 minutes read
Categories
Microsoft 365 Office 365 SharePoint

mQuery for SharePoint 2013

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.

Matthew Maher

About Matthew Maher

Matt Maher is a technical architect with Netwoven who has been working with Fortune 500 companies implementing large scale enterprise systems for the last 10 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 User Interface, SharePoint, Social, and Digital Marketing. His leadership and expertise have helped companies build intuitive, highly effective websites and applications.

Matt holds a BS in Computer and Informational Sciences from the University of Massachusetts.

LinkedinTwitterFacebook

Leave a Reply

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