Welcome Guest, Not a member yet? Register   Sign In
CSS with Jquery
#1

[eluser]Unknown[/eluser]
Hi i need some assistance creating a menu bar using css and Jquery. I want to use a general menu for all my pages, hover when you go on top of it. how would i hover using jquery and css. Say i were to hover and change the image to another image which is in my image folder. Now in my root i have a folder called jsscssimg which contains the js folder, css folder and image folder. Now in Jquery i would trigger a function add class when mouse over or hover and undo cssclass if mouse leaves.


For my css how would i locate my URL to my image folder from the view folder (where my template is...which has the menu on it)
Code:
background-image:url('jscssimg/images/thisimg.png');

Also the way my menu developed i want my menu to a add a different class when its clicked (button 1) but say another menu tab was clicked i need button 1 to go back to the original img with the hover function and button 2 to have a different image where it cannot be hovered.

The purpose of this is when i click on the home page i want to know i am on the home page and if i were to click a different page i want to know that what page i'm on and if i were to hover that menu tab while i'm on that page it wont hover. can someone give me some assistance :-)




Theme © iAndrew 2016 - Forum software by © MyBB