Site Asset List View and jQuery issue and resolution #in
So recently I have been working on a project where we make use of the new Site Asset library capabilities in SharePoint 2010.
The Site Asset library comes with new functionality including pop-up previews of images and videos.
In particular, we are taking advantage of the fact that by uploading an image into the site library, 2 thumbnail versions are created for the list view preview and the pop-up preview.
This provides some good unique user experiences previously not seen in SharePoint out of the box before.
Anyway, to the jQuery issue:
It would appear that the Site Asset library (standard list view) uses the $ call for its JavaScript functions. This obviously conflicts with the standard way to call jQuery functionality:
This results in the error:
- Object doesn’t support this property or method
Resolution:
jQuery being implemented onto the master page doesn’t pose a problem since the SharePoint code is obviously called afterwards.
So by referencing jQuery in its longhand method:
you can use both the site asset functionality as well as any jQuery customisations that you may need to do.
Hopefully that helps out fellow SharePoint customisers out there.
Note that this seems to be the only place in SharePoint where the $ conflict occurs. Elsewhere, you should be fine using the $ notation.
M.
Hi Marc,
Totally agree. I haven’t found it elsewhere either.
Kind Regards
Giles
PS. I know a lot of the blogs I post about could be a lot easier with your SPServices library. I do plan to use it once I get the chance to evaluate it as it looks very good. Keep up the good work 🙂
Hi,
if you include jQuery with a siteaction please note to use a higher sequence number (e.g. 50000) or you will experience other issues like described here: http://social.technet.microsoft.com/Forums/en-US/sharepoint2010programming/thread/ae7c5e7e-467a-4063-9b42-81d941284b69
br,
patrick