Reply
Need help with jQuery
Old 04-13-2008, 05:53 AM Need help with jQuery
wanted4h's Avatar
Junior Talker

Posts: 2
Name: Gediminas
Location: Lithuania, Kretinga
Hello,

I need some help with javascript or jQuery. I need some scripts examples.

First, look at this site http://www.kretas.lt/?cat=11 when I take mouse on the grey backround, it convert to green.

I know that script changing CSS. So how to do it?

Second, at the same site top navigation. When you take mouse on the link, after it start new meniu

So i need this 2 scripts. Sorry for me poor language
wanted4h is offline
Reply With Quote
View Public Profile Visit wanted4h's homepage!
 
When You Register, These Ads Go Away!
     
Old 04-13-2008, 07:28 PM Re: Need help with jQuery
Christopher's Avatar
Iced Cap

Latest Blog Post:
Unicode and Character Sets
Posts: 3,108
Location: Toronto, Ontario
Since you're using jQuery, both are quite easy.

The first is probably something like:
Code:
$('#your-wrapper-el').mouseover(function(e) { $(this).addClass('highlight'); });
$('#your-wrapper-el').mouseout(function(e) { $(this).removeClass('highlight'); });
Just create a 'highlight' class in your CSS and modify any colors:
Code:
.highlight { background-color: #eee; border: 1px solid #555; }
The second one is only slightly more complicated. Assign a mouseover event to the menu item element that unhides/hides various wrapper elements that contain the sub-menu items. I don't have time to show specific code, but it can be as simple as:

Code:
$('#my-menu-item').mouseover(function() {
    // Hide other menus
    $('#submenu1, #submenu2, #submenu4').hide();

    // Show this menu
    $('#submenu3').show();
});
Christopher is offline
Reply With Quote
View Public Profile Visit Christopher's homepage!
 
Reply     « Reply to Need help with jQuery
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12714 seconds with 13 queries