![]() |
Category menu expand OnClick..possible ?
It's possible to expand category menu OnClick through some piece of Javascript code ?
I have a long list of root categories so this small modification is needed very badly. Any one can help me please? :roll: |
Re: Category menu expand OnClick..possible ?
If I am understanding what you want to do, then this should work for you:
http://jsfiddle.net/jbabey/kSQfy/1/ |
Re: Category menu expand OnClick..possible ?
Thanks Mike for providing the solution. Can you please tell me exactly what code & in which template while & where to use this code to achieve the results?
|
Re: Category menu expand OnClick..possible ?
That is going to depend on your skin. You are using ideal_comfort so I would make all the changes in that skin directory. You should be a able to copy the code below, and simply paste it into a new template file that you create.
In this case I created: /ideal_responsive/customer/categories.tpl You would likely create: /ideal_comfort/customer/categories.tpl I took some time and tested this out, for now you can see it working at my test site: http://trainingpen.com/ I've modified the script to show and hide the div, clicking the link will expand and collapse. I also commented out the unnecessary part that hid other divs. Code:
{* If you feel I have earned it, you can thank me with a PayPal payment to mike@babymonkeystudios.com |
Re: Category menu expand OnClick..possible ?
Hi Mike,
Thanks a lot for the code. This is the solution I was looking for. How ever there are small issues. 1)Since the "categories" menu is replaced by link "expand categories" it does not look good & it will tough for the customers to find out that link. The ideal solution would be it should display category menu with 5 categories link & then it should display link "expand categories" or "See More". 2) Also there is one small issue exists. Just click on "expand categories" now click on any category link so you be taken to that particular category page. Now again click to "expand categories" & you will see it will take you to the home page ! Note: This issue does not exists at your demo site. I am not sure what is the correct way to implement this code but I have done following steps to integrate the code. I am using ideal comfort template. 1) I saved your code at as \skin\common_files\customer\categories_new.tpl 2) I opened skin\ideal_comfort\customer\left_bar.tpl & replaced the code {include file="customer/categories.tpl"} with {include file="customer/categories_new.tpl"} I hope it's correct. |
Re: Category menu expand OnClick..possible ?
Anandat,
You're welcome. This could certainly be done, but would require more effort. The changes you made sound correct, I don't know why it is not behaving the same for you. Perhaps try to save categories.tpl as a .bak file, and them place the changes in that file directly? Perhaps there is some Javascript Conflict in the console? I cannot support you further on this, I think I have taken it far enough for free advice. I think you will need to hire a developer to complete this work for you. |
All times are GMT -8. The time now is 07:25 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.