NetTalk Central

Author Topic: How to Dynamically Change Background of a TAB?  (Read 3064 times)

Poul

  • Full Member
  • ***
  • Posts: 160
    • View Profile
How to Dynamically Change Background of a TAB?
« on: February 25, 2013, 08:50:00 AM »
In Nettalk 4 i could set a custom CSS class for dhtmlgoodies_MytabTab#....
and set the .background: for the each tab/panel

Doing things the jquery way is less obvious to me how to change some things.

Is there a technique/documentation how to dynamically control some
of the jquery thems and behaviours?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: How to Dynamically Change Background of a TAB?
« Reply #1 on: February 25, 2013, 10:07:06 PM »
the setting for the tab is exactly the same. ie same, style set in the same place.

If you look in firebug, and inspect the tab, you'll see the problem. You background-color setting is being overridden by another background setting which is "more important". (importance has to do with order, and since your style is likely in the styles section, not the themes section, it's being overridden by the settings for the individual theme.)

There are 2 solutions;
a) move your custom css into the theme - this'll mean moving the file and then adjusting the setting on the Webserver \ Files list from "styles" to "themes".

or

b) add the !important attribute to your class. eg
.whatever{
background-color: red ! important;
}


>> Doing things the jquery way is less obvious to me how to change some things.

Css is Css and has nothing to do with jQuery.

cheers
Bruce

Poul

  • Full Member
  • ***
  • Posts: 160
    • View Profile
Re: How to Dynamically Change Background of a TAB?
« Reply #2 on: February 26, 2013, 06:01:59 AM »
thank you, that works!

i never knew that css could be ! important: <g>