Forums

Welcome, Guest
Username: Password: Remember me

TOPIC: How to change style of div-element, when it is detached by sticky panel

How to change style of div-element, when it is detached by sticky panel 1 year 8 months ago #4118

  • gymbgd.de
  • gymbgd.de's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
I'm using ju sticky panel for some elements and modules on my website and it's working fine, especially with modules. Getting my menu sticky, which in inside a div-element was not a problem assigning the div-id to to plugin.
But I've some trouble changing the div-style, when it is detached. The div initially is transparent, and should change background-color to some hex-value while scrolling down. I think the onDetached field should provide me the thing I want to do, but how to use it?

Perhaps you have an example hot to manage it.

Thanks and best regards
Günther
The administrator has disabled public write access.

How to change style of div-element, when it is detached by sticky panel 1 year 8 months ago #4135

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Posts: 1641
  • Thank you received: 178
  • Karma: 43
When detached we add one more class to the div.
Use firebug to see and use that class to format css
The administrator has disabled public write access.
The following user(s) said Thank You: gymbgd.de

How to change style of div-element, when it is detached by sticky panel 1 year 8 months ago #4157

  • gymbgd.de
  • gymbgd.de's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
Thanks it's working and it's very simple if the way is known.

There occurs another problem:
I try using sticky panel to stick the main menu. The actuel css-code in override.css for the div width id gkMainMenu is
    #gkMainMenu.detached {
       padding-top: 0px;
       background: rgba(14, 22, 35, 0.89) none repeat scroll 0 0;
    }
This div is containered in another div, so its width can't be more than the parent div. But by scolling down I want the div to get fullwdith.
Can I achieve that using only css or is there more work to do.

Thanks so far

Günther.

URL I'm talking about is: joomla.gymbgd.de
The administrator has disabled public write access.

How to change style of div-element, when it is detached by sticky panel 1 year 8 months ago #4203

  • gymbgd.de
  • gymbgd.de's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
Solved the problem myself by editing the css like the follwing:
#gkMainMenu.detached {
	padding-top: 0px;
	background: rgba(14, 22, 35, 0.89) none repeat scroll 0 0;
	left: 0px !important;
	width: 100% !important;
}

Best regards,
Günther.
Last Edit: 1 year 8 months ago by gymbgd.de.
The administrator has disabled public write access.
Time to create page: 0.211 seconds
Powered by Kunena Forum