I created a navigational menu , some of which have submenus. I want the menu item with fa-chevron-down ( fa-chevron-down arrow icon) to change to fa-chevron-up ( fa-chevron-up arrow icon) when the user clicks on this menu item and changes its value when the user clicks on another location. Plus I also have two queries,
1) Since I am very new to jquery, the jquery code I wrote seems to do the trick, but is there a better way? (note that when one menu item is double-clicked, the shift occurs twice. ITS OPEN)
2) When the user resizes the window, the html elements do not remain in place and are scattered.
Thanks in advance.
jsfiddle demo
UPDATE: Thanks for solving my problem. I clarified my problem further and it works fine. Here is the final ** JSFIDDLE **
javascript jquery html css font-awesome
Arin chakraborty
source share