rafique12
asked on
Change element depending on current page using jQuery
Hi guys,
I am trying to figure out a way to change the position of a css element depending on the page it is being viewed using jQuery. I must stress that I am very new to jQuery and would like to know how I can manipulate the DOM for my site.
I need something like this:
if element is on homepage {position:relative} else {position:fixed};
I really not sure how to do this and would be grateful for some assistance please...
I am trying to figure out a way to change the position of a css element depending on the page it is being viewed using jQuery. I must stress that I am very new to jQuery and would like to know how I can manipulate the DOM for my site.
I need something like this:
if element is on homepage {position:relative} else {position:fixed};
I really not sure how to do this and would be grateful for some assistance please...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Its only fair. Thanks for the nudge!
Why the C if my response did not help then just have the Q deleted and indicate you need something additional. It is really quite insulting that I am the only one to respond to your question and you throw the lowest possible grade at me, without any indication of a reason for it.
Cd&
Cd&
ASKER
You shouldn't be insulted, its an average answer to a question that had asked for something more specific. I preferred to award you the points instead of deleting the question as I thought that would have been an insult... Seems I was damned if I did and damned because I didn't.
Is there a way to change the grade?
Is there a way to change the grade?
ASKER
I was trying to avoid duplicating the template file for shopping cart sidebar (Magento). I currently have it showing on the product view page with position relative. I also have it showing on the checkout page where I would like it to be fixed so its always visible when scrolling down the page....