-3

I am using an OsCommerce web shop. I want to fade out a sidebar, but only on one specific subpage, but I don't know how. In WordPress you can do it with page ID it think. Is there any way to do this in OsCom or in general with for just one subpage?

1 Answers1

0

Well, I don't know about oscommerce, WordPress and all that stuff (sorry), but I think that, if you know the url (I guess you know it, or you have some placement variable for get it) where you want to apply the fade, maybe you can:

  1. Create a class for the fade transition/animation.
  2. Add an ID to get the sidebar with js/jquery.
  3. Add javascript/jquery code to your site for apply that css class ONLY in that page.

Something like this (with js & jquery):

<!-- language: lang-js -->
if (document.location.href =='http://this.is.my.url/my-subpage') {
  $('#mySidebar').addClass('fade');
}

Pure js:

<!-- language: lang-js -->
if (document.location.href =='http://this.is.my.url/my-subpage') {
  document.getElementByID('mySidebar').className = 'fade';
}

Here, the sidebar has id="mySidebar" and we set their class to class="fade" only in the subpage http://this.is.my.url/my-subpage.

Hope it help you.

juanriqgon
  • 99
  • 1
  • 2
  • 7