Change CSS of One Element Based on Class of Another Element

Don’t you mean:

jQuery (".butmore").

Why are you saying ‘if’ ? Either its clicked or its not.

Simply set/remove a remove a class on the header at the same time you set .active on the .butmore and then use css.

.header-fixed {position:fixed}

It is best to use css for the css change as it is likely that as you are changing the header from fixed to relative then you will need to change a number of other properties on the header (e.g. width for a start will need to be 100% and of course the co-ordinates should be defined ) and maybe changes on other elements to compensate for the now fixed header. It may indeed be better to add a class to the body tag so that you can control any other element on the page at the same time using a new class on the body.

Is this question a continuation of your other thread?