Expand Category Treeview Menu by default

Jan 31, 2010 at 10:34 AM

Hi,

I would like to expand my treeview category menu by default. Would that be possible? jQuery or how to achieve this?

Cheers,
Thomas 

Coordinator
Jan 31, 2010 at 11:30 AM

Hi Thomas,

Have a look at the options on this page here (click the tab labelled "Options". You can use them in the backoffice to alter the way the menu behaves. You're probably wanting "collapsed: false".

Rob

Jan 31, 2010 at 1:55 PM

Hi Rob,

thanks for the quick and correct answer. The only problem you might want to change for the future is remove  the brackets in the current jqtreeview.code :
<script language='javascript' type='text/javascript'> jQuery(document).ready(function(){jQuery('#NBStoreTreeMenu').treeview({animated:'fast', collapsed: 'true', persist: 'location'});}); </script>

the collapsed: 'true' does work but collapsed: 'false' doesn't. it is collapsed: false without the brackets that does the trick. so maybe remove it by default so
<script language='javascript' type='text/javascript'> jQuery(document).ready(function(){jQuery('#NBStoreTreeMenu').treeview({animated:'fast', collapsed: true, persist: 'location'});}); </script>

just my 2 cents,

Thomas

Coordinator
Jan 31, 2010 at 11:36 PM

ah yep, I see what you mean. It appears that any values that are boolean true or false don't have quote marks, whilst all other string values do need quotes.

I'll copy this as a work item.

Regards,
Rob

Coordinator
Jan 31, 2010 at 11:47 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.