Help with lavalamp jQuery plugin

A place for discussion about skinning and design. Before posting questions here you should review the documentation about creating skins.

This thread is closed to new posts. You must sign in to post in the forums.
9/30/2009 1:52:40 PM
Gravatar
Total Posts 67

Help with lavalamp jQuery plugin

Hi!

I found this awesome plugin for jQuery that I wanted to add to my navigation in a mojoPortal install. It seems like there is some sort of conflict with the way that mojo outputs menus, and I was wondering if I can get some help.

the plugin is here:  http://www.gmarwaha.com/blog/2007/08/23/lavalamp-for-jquery-lovers/

My code in layout.master is:

<script type="text/javascript" src="/Site/Data/Sites/1/skins/site-skin/jquery-1.1.3.1.min.js"></script>
<script type="text/javascript" src="/Site/Data/Sites/1/skins/site-skin/jquery.lavalamp.min.js"></script>
<script type="text/javascript" src="/Site/Data/Sites/1/skins/site-skin/jquery.easing.min.js"></script>

<script type="text/javascript">

$(function() {

$("#nav ul.AspNet-Menu").lavaLamp({

fx: "backout",

speed: 700,

});

});

</script>

and the nav control code is this:

 <portal:SiteMenu id="SiteMenu1" runat="server" UseTreeView="false" UseSpanInLinks="true" HideMenuOnSiteMap="false" Direction="Horizontal" TopLevelOnly="true" ></portal:SiteMenu>

I know that it has to do with javascript and not css because the plugin generates an additional <li> after the other <li>s that it uses to create the effect, and I can see in firebug that it's not getting generated.

any ideas?

10/1/2009 2:01:07 PM
Gravatar
Total Posts 67

Re: Help with lavalamp jQuery plugin

figured it out, it was definitely a jQuery problem. Beware, the jQuery packaged with that plugin does not work as intended. link to jQuery on Google.

10/1/2009 2:06:10 PM
Gravatar
Total Posts 18439

Re: Help with lavalamp jQuery plugin

mojoPortal already includes jQuery from the google CDN. You do not need to add it, you just need to make sure any plugins you load load after jquery in the page. So you can't include the plugin directly in layout.master for example, you have to wrap it in a UserControl then add your UserControl to layout.master and that will make whatever is in your UserControl load after the main javascripts we include.

ie view the source of the rendered page and make sure your jQuery plugin is included after jQuery from google.

interesting plugin, I may look at integrating it myself sometime.

Hope it helps,

Joe

10/1/2009 2:33:22 PM
Gravatar
Total Posts 67

Re: Help with lavalamp jQuery plugin

thanks Joe, but I tried loading it after the jQuery that I saw was already loading, without attaching the jQuery js file that was included, but I kept getting a "jQuery not defined" error. I'll play with it some more and see what I can come up with. As is, right now it's working.

10/1/2009 2:38:27 PM
Gravatar
Total Posts 18439

Re: Help with lavalamp jQuery plugin

There was a bug in the initial 2.3.1.9 release that caused a jquery bug. If you download it again and replace the file /ClientScript/oomph/oomph.min.js it may fix it for you.

I would make sure the plugin is not using jQuery.NoConflict();

Hope it helps,

Joe

10/1/2009 2:44:25 PM
Gravatar
Total Posts 67

Re: Help with lavalamp jQuery plugin

I just downloaded the latest version on Tuesday, was there a fix since then?

10/1/2009 2:50:41 PM
Gravatar
Total Posts 18439

Re: Help with lavalamp jQuery plugin

Yes, it was patched yesterday morning, see related thread. Just get the one changed file, then clear your browser cache and maybe it will solve that Jquery error you were having with this plugin.

Hope it helps,

Joe

10/9/2009 11:58:56 AM
Gravatar
Total Posts 67

Re: Help with lavalamp jQuery plugin

I finally got around to replacing that file, and it works! but not in IE... I have some debugging to do.

8/7/2011 7:31:10 AM
Gravatar
Total Posts 51

Re: Help with lavalamp jQuery plugin

Hi Joe,

I used LavaLamp jQuery Plugin in mojoPortal and it works except one thing very well. It's a menu with 4 items. Third item has subitems, I mean this page has child pages. If this item would selected (clicked), subitems are shown under the menu item. For better understanding, please see the images by this link.

In theme.skin file I configured it as followed;

<portal:mojoTreeView runat="server" SkinID="LavaLamp"
            ContainerCssClass=""
            RootUlCssClass="lavaLampWithImage"
            RenderLiCssClasses="true"
            RenderAnchorCss="true"
            LiCssClass=""
            LiRootExpandableCssClass=""
            LiRootNonExpandableCssClass=""
            LiNonRootExpnadableCssClass=""
            LiSelectedCssClass="current"
            LiChildSelectedCssClass=""
            LiParentSelectedCssClass=""
            AnchorCssClass=""
            AnchorSelectedCssClass=""
            ExpandDepth="0"
      ShowExpandCollapse="false"
   PopulateNodesFromClient="false"             
         />

And in layout.master:

<portal:SiteMenu ID="SiteMenu1" runat="server" MenuSkinID="LavaLamp" UseTreeView="true"
                 HideMenuOnSiteMap="false" ></portal:SiteMenu>

 

I hope, you can help.

Thanks,
Erhan

8/7/2011 8:15:11 AM
Gravatar
Total Posts 18439

Re: Help with lavalamp jQuery plugin

Hi Erhan,

I see the screen shots but its not clear to me if there is some problem. Can you explain more what the problem is? I don't see any problem in the pictures so maybe I don't understand what you are expecting it to do. I don't know anything about the lavalamp plugin. Are you saying you don't want it to show the child pages in the menu?

Best,

Joe

8/7/2011 8:32:11 AM
Gravatar
Total Posts 18439

Re: Help with lavalamp jQuery plugin

If your goal is to not show the child items then set MaxDataBindDepth="2" in your theme.skin, this will bind the root node (which is not shown) and the first level which is shown.

Hope that helps,

Joe

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