[jQuery] Re: Code simplification?

2009-01-13 Thread Diane Nardozzi
You could add the offscreen class to the appropriate menu item and then
remove the sibling classes all at once
$(.nav_sub_products).siblings().removeClass('onscreen'); You would just have
to be sure that all the menu items are true siblings.

On Tue, Jan 13, 2009 at 11:36 AM, r...@lighthouseuk.net 
wrote:

>
> Hi,
> I'm new to jQuery and liking what I've seen so far.
>
> I'm curious as to whether I can reduce my code, using chaining
> perhaps?
>
> Example...
>
> $('.nav_company').hoverIntent(function() { // toggle display of
> company sub menu content panel
>$('.nav_sub_default').removeClass('onscreen').addClass
> ('offscreen');
>$('.nav_sub_company').removeClass('offscreen').addClass
> ('onscreen');
>$('.nav_sub_products').removeClass('onscreen').addClass
> ('offscreen');
>$('.nav_sub_markets').removeClass('onscreen').addClass
> ('offscreen');
>$('.nav_sub_tools_support').removeClass('onscreen').addClass
> ('offscreen');
>$('.nav_sub_news_events').removeClass('onscreen').addClass
> ('offscreen');
>  },function(){
>return false;
> });
>
> Based on the fact that there are 6 menu items (nav_sub_x) - I
> currently have the above code entered 6 times to add and remove the
> necessary classes from each of the relevant DIVs on the page.
>
> Is there a cleaner way to do this?
> Many thanks in advance.
> Cheers,
> Rob
>


[jQuery] Re: CSS problem on IE6?

2008-12-24 Thread Diane Nardozzi
You're welcome!

2008/12/24 Nguyễn Quốc Vinh :
> Fantastic! You really  are a expert Thanks so much! I will add your email!
> Hope you can help me a bit in the future!
> Thanks again! I'm verey grateful at you!
>
> 2008/12/23 Diane Nardozzi 
>>
>> And your div#page-wrap is off by 1px, so a quick fix would be to make it
>> 892px;
>>
>> For the nav... Take the height off the anchor style...
>>
>> ul.menu-top li a { /*height: 30px;*/
>>
>> -Diane


[jQuery] Re: CSS problem on IE6?

2008-12-23 Thread Diane Nardozzi
Take the height off the anchor style...

ul.menu-top li a { /*height: 30px;*/


>
> 2008/12/23 Nguyễn Quốc Vinh :
>> Yes, i know this is jQuery group!
>> But i'm on working and i really need help from someone:(!
>> This is an Joomla site which display in IE7,FF! But it is wrong in IE6!
>> I don't understand why! It's so trange!
>> This is test site
>> http://www.bluesilverdesign.com/brown-stone/
>> View it with Ie6 and you will see problem right now!
>> Does anyone have any suggestions?
>> Thanks so much!
>>
>>
>> --
>> /
>> * Người ta thưởng chỉ chú ý đến những kẻ lên như diều gặp gió! Nhưng hỡi ôi,
>> chỉ có cát, bụi và lông hồng mới là những thứ lên nhanh nhất
>> */
>>
>


[jQuery] Re: CSS problem on IE6?

2008-12-23 Thread Diane Nardozzi
This is a good article -

Top reasons your CSS columns are messed up
http://warpspire.com/tipsresources/web-production/css-column-tricks/

It's all about the math, make sure there is nothing in your left
(243px) or right (648px) column that exceeds the width that you're
setting. IE7 and FF will allow the content to overflow the floated
column, but IE6 will just drop the column below the first.

For the navigation try adding width: auto; to your ul.menu-top li.

HTH,

Diane

2008/12/23 Nguyễn Quốc Vinh :
> Yes, i know this is jQuery group!
> But i'm on working and i really need help from someone:(!
> This is an Joomla site which display in IE7,FF! But it is wrong in IE6!
> I don't understand why! It's so trange!
> This is test site
> http://www.bluesilverdesign.com/brown-stone/
> View it with Ie6 and you will see problem right now!
> Does anyone have any suggestions?
> Thanks so much!
>
>
> --
> /
> * Người ta thưởng chỉ chú ý đến những kẻ lên như diều gặp gió! Nhưng hỡi ôi,
> chỉ có cát, bụi và lông hồng mới là những thứ lên nhanh nhất
> */
>