By: OuTa-SyNc
Date: 2009-05-11
Time: 01:15
|
remove css class on no dataHi All,
I have a drop-down style menu that is filled via TBS, it consists of menus and sub-menus, everything is working fine except I want to remove 'class=fly' when the menu has no submenus. see below
I want to be able to remove class=fly when block 'smu' has no data but I just can't seem to get it to work, I have tried bmagnet with no success. I need to remove class=fly because it displays the menu with an arrow indicating it has a submenu. Can anyone help? Kind Regards, OuTa-SyNc |
|
By: Skrol29
Date: 2009-05-11
Time: 16:27
|
Re: remove css class on no data
TBS 3.05 has attribute features that can help to do what you describe. TBS 3.05 is available in beta version. |
|
By: OuTa-SyNc
Date: 2009-05-11
Time: 20:03
|
Re: remove css class on no dataThank you for replying, how do I optain the beta? I am currently running 3.4.0, will it not work for this version?
|
|
By: Skrol29
Date: 2009-05-12
Time: 12:00
|
Re: remove css class on no dataThe beta is available here:
http://groups.google.com/group/tbs-next |
|
By: OuTa-SyNc
Date: 2009-05-12
Time: 13:43
|
Re: remove css class on no dataHi Skrol29,
Thank you, I have downloaded the beta and inserted the code above but am unable to get it working, I have also inserted:
Still with no luck, are you able to help? |
|
By: Skrol29
Date: 2009-05-12
Time: 15:01
|
Re: remove css class on no dataThe code I've given above is bugged. The good one is:
|
|
By: Skrol29
Date: 2009-05-12
Time: 17:15
|
Re: remove css class on no dataI have to precise that the new parameter "att" (coming with the beta TBS version) will unfortunately not work in your case.
Fields that are outside their subblock will not be correctly merged if they have parameter "att" or "magnet". This is a known bug, hard to fix. It happens because "att" and "magnet" are making the field to move in a too erratic way. |
|
By: OuTa-SyNc
Date: 2009-05-12
Time: 17:27
|
Re: remove css class on no dataThank you for your help anyway, you are of course correct it doesn't work for my scenario. Though I must admit it is a tricky one. I'm sure I can find another way of doing it, or just leave it as it is.
Thank you for your hard work :) |
|
By: Skrol29
Date: 2009-05-12
Time: 23:05
|
Re: remove css class on no dataThe new snippet I've provided should work for you case.
I've also fixed the bug I've told about. The fiw will be availbale for the next beta version. |
|
By: OuTa-SyNc
Date: 2009-05-12
Time: 23:20
|
Re: remove css class on no dataOh, I didn't realise the snippet was meant to work, I thought it wouldn't work without the att function.
I did try your snippet but it didn't work. I understand what the code does but it still doesn't work, we are simply saying when the subblock is merged with no data insert 'nothing' but when data is present insert 'fly' I don't understand why it wont work? |
|
By: Skrol29
Date: 2009-05-13
Time: 17:31
|
Re: remove css class on no dataYou're right it does't work neither.
It doesn't work because the [smu.#] fields placed between two sublock is merged with the data of the subblock placed before. The only solution I see in your case is to use Javascript to change the class value. |