jquery plugin integration

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
4/18/2011 12:14:33 AM
Gravatar
Total Posts 51

jquery plugin integration

Hi, I wish to integrate a jquery plugin found here: http://www.bkosborne.com/jquery-waterwheel-carousel, and I downloaded and tried the example from Joe ( http://download.mojoportal.com/tutorials/mojousergroup-20100824.zip). But I´m stucked sad

I need suggestion from anybody who have tried integrating a jquery plugin. 

Thanks

4/20/2011 10:13:14 AM
Gravatar
Total Posts 19

Re: jquery plugin integration

I had intergrated FancyBox ( http://fancybox.net ). 

You can see the code there given for using it. Process is similar. 

Check this from the mojoportal's documentation (Adding Custom Javascript: http://www.mojoportal.com/adding-custom-javascript.aspx ).

There is also another point to care for. The jquery plugin you want to use uses a different jquery version than the cms itself. So there will be a conflict.

I personally added javascript in my own way and this helped me solved the issue I mentioned.

I edited the layout.master file of my skin and I added this after <title></title> :

 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
    <script type='text/javascript'>
     var $jq = jQuery.noConflict();
    </script>

and I call the 1.4 library like this

   $jq(document).ready(function () {

I guess there should be a more proper way to do it but this is what works for me.

4/20/2011 10:43:06 AM
Gravatar
Total Posts 18439

Re: jquery plugin integration

If you need to downgrade to an older version of jQuery for compatibility with a custom plugin, you can do it very easily by copying these settings from Web.config to user.config and specify the versions you want to use.

 <add key="GoogleCDNjQueryVersion" value="1.5.2"/>
 <add key="GoogleCDNjQueryUIVersion" value="1.8.11"/>

I would not load more than one version and I would avoid the hassle and other problems that may result from using jQuery.noConflict()

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.