Little Issue with Slide Up

Hey Guys,

Here is another site working on.

This is page I’m having some issues on…

http://redrhinorestoration.com/web2014/#services

When you click on “Show Services” it slides up the services which works great but in smaller browsers if the services box goes over the “Show Services” icon you can not close the services box.

I put a Close anchor at the bottom of the services box you will see it when you show services. Is there a simple way to click on it and it will slide the services box back down and not visible?

Thanks,

Mike

Hello,

Has anyone had chance to take a quick peak at this situation.

Hopefully it’s something simple.

Thanks

Mike

Hi,

You could close it with a bit of jquery.

Ad this at the bottom of the html.


<script>
$( ".services-tagger .ui-link" ).click(function() {
  $('.cbp-spmenu').removeClass('cbp-spmenu-open');
});
</script>

There’s probably a way to build it in to your original script but that’s too complicated for me.

Hi Paul,

Thanks,

I moved the site to this location and added the script but didnt seem to work, is there something I did incorrect?

Here is the link, you’ll notice the CLOSE link in the services still doesn’t close the Services slide up…

http://redrhinorestoration.com/wp/#services

Thanks,

Mike

Hi,

You removed the class ui-link that was on the original and which the js is targetting.


<p class="services-tagger"><a class="ui-link" href="#">Close</a></p>

If you are not using that class then change the js to target the a element instead.


<script>
$( ".services-tagger a" ).click(function() {
  $('.cbp-spmenu').removeClass('cbp-spmenu-open');
});
</script>


…or add a unique class instead if you are using services-tagger elsewhere

Thanks!!!

Works perfectly now, except when clicking on Show Services in Safari or it doesnt slide up at all.

Also, my page transitions doesnt seem to work in FireFox and IE any reason for that?

Thanks,

Mike

It works fine in Safari mac and Chrome PC and Mac. If you are talking about Safari on the PC then that is not supported by apple any more and is a very old version unlikely to run any modern css.

Weird on my Mac it doesn’t work on Safari for some reason.

The page transitions don’t work in FireFox or IE it doesn’t slide to the page just shows the new page am I missing special calls in my CSS for that or something?

Now onto the mobile styling, joy! Lol

Try clearing the cache or updating to the newest version

The page transitions don’t work in FireFox or IE it doesn’t slide to the page just shows the new page am I missing special calls in my CSS for that or something?

In pagetransition.css you are only catering for- webkit.

e.g. a small sample of what you have.


.spin {
	-webkit-transform:rotate(360deg);
	-webkit-animation-name:spin;
	-webkit-animation-duration:1s;
	-webkit-animation-iteration-count:infinite;
	-webkit-animation-timing-function:linear
}
@-webkit-keyframes spin {
from {
-webkit-transform:rotate(0deg)
}
to {
	-webkit-transform:rotate(360deg)
}
}
.in, .out {
	-webkit-animation-timing-function:ease-in-out;
	-webkit-animation-duration:350ms
}

For all the prefixed rules in that file you need to set up duplicate rules for -moz and -ms (and -o if supporting opera) and finally finishing with the standard non prefixed rule. Remember that @keyframe blocks are all in their own separate block for each prefix.

There are tools around that will help prefix then for you if you google ‘prefix free’. Otherwise its just a matter of copying each of those rules and changing the prefix for each vendor.

Ahhhh yes, I keep forgetting those!

Also, on smaller screens or screens where content goes below the fold how can I have the background still be there when they scroll, cause right now when scrolls it goes away. I have background-size: cover which I want there.

Most likely it will be all content in the browser in most cases hopefully but on mobile etc it won’t be. I still have to do my mobile styling but tried to give the background a scroll but that didnt work.

Thanks,

Mike

Hi Paul,

I put in all my prefixes but still the page transitions do not work on FireFox or IE…

Also another thing I noticed…

If you go to the homepage…

http://redrhinorestoration.com/wp/

Click on Process in the right navigation and you will see the first slide the text is not centered like all the other slides after it once you click the arrow.

But if you go right to that section…

http://redrhinorestoration.com/wp/#process

The text is in the correct spot.

Or if you go through the slideshow from when it is wrong when you hit it again it is in correct spot.

How can I solve this, is it something with the CSS that I can do to solve that first slide?

Thanks,

Mike

In your keyframes you can only have the prefix values for the prefix you used on the keyframe.

You have this:


@keyframes spin{
	from {
		-webkit-transform:rotate(0deg);
		-moz-transform:rotate(0deg);
    	-ms-transform:rotate(0deg);
    	-o-transform:rotate(0deg);
        transform:rotate(0deg);
	}
	to{
		-webkit-transform:rotate(360deg);
		-moz-transform:rotate(360deg);
    	-ms-transform:rotate(360deg);
    	-o-transform:rotate(360deg);
        transform:rotate(360deg);
	}
}

@-webkit-keyframes spin{
	from {
		-webkit-transform:rotate(0deg);
		-moz-transform:rotate(0deg);
    	-ms-transform:rotate(0deg);
    	-o-transform:rotate(0deg);
        transform:rotate(0deg);
	}
	to{
		-webkit-transform:rotate(360deg);
		-moz-transform:rotate(360deg);
    	-ms-transform:rotate(360deg);
    	-o-transform:rotate(360deg);
        transform:rotate(360deg);
	}
}


You should have this:



@-webkit-keyframes spin{
	from {
		-webkit-transform:rotate(0deg);
	}
	to{
		-webkit-transform:rotate(360deg);
	}
}

@-moz-keyframes spin{
	from {
		-moz-transform:rotate(0deg);
	}
	to{
		-moz-transform:rotate(360deg);
	}
}
@-ms-keyframes spin{
	from {
		-ms-transform:rotate(0deg);
	}
	to{
		-ms-transform:rotate(360deg);
	}
}

@keyframes spin{
	from {
        transform:rotate(0deg);
	}
	to{
        transform:rotate(360deg);
	}
}


(Add in the opera prefixes also)

Always keep the non-prefixed code last in source otherwise there is a danger of the browser using the prefixed code when it supports the standard property.

Perfect! Will work on making these changes.

How about the background issue I’m having where them browser window is small and have to scroll for text, below the background image is just the color of the background how can I make it so image is always there, like stays still I’m sure I had it but maybe the cover option effects it in some way?

Thanks,

Mike

Hi Paul,

This did not work either when changing the keyframes as you mentioned above.

Still the page transition does not work in FireFox.

Is there something I did wrong?

Thanks,

Mike

There’s a lot of css to look through but it looks as though you have them in the right order now.

I just pulled this css from your page and it works straight away on Firefox with this small demo.


<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<style>
div{width:500px;height:500px;background:red}

.in,.out{
-webkit-animation-timing-function:ease-in-out;
   -moz-animation-timing-function:ease-in-out;
    -ms-animation-timing-function:ease-in-out;
     -o-animation-timing-function:ease-in-out;
        animation-timing-function:ease-in-out;
-webkit-animation-duration:350ms;
   -moz-animation-duration:350ms;
    -ms-animation-duration:350ms;
     -o-animation-duration:350ms;
        animation-duration:350ms;
}

.slide.in.reverse{
-webkit-transform:translateX(0);
   -moz-transform:translateX(0);
    -ms-transform:translateX(0);
     -o-transform:translateX(0);
        transform:translateX(0);
-webkit-animation-name:slideinfromleft;
   -moz-animation-name:slideinfromleft;
    -ms-animation-name:slideinfromleft;
     -o-animation-name:slideinfromleft;
        animation-name:slideinfromleft;
}

@-webkit-keyframes slideinfromleft{
	from{
		-webkit-transform:translateX(-100%);
	}
	to{
		-webkit-transform:translateX(0);
	}
}

@-moz-keyframes slideinfromleft{
	from{
		-moz-transform:translateX(-100%);
	}
	to{
		-moz-transform:translateX(0);
	}
}

@-ms-keyframes slideinfromleft{
	from{
		-ms-transform:translateX(-100%);
	}
	to{
		-ms-transform:translateX(0);
	}
}

@-o-keyframes slideinfromleft{
	from{
		-o-transform:translateX(-100%);
	}
	to{
		-o-transform:translateX(0);
	}
}

@keyframes slideinfromleft{
	from{
		transform:translateX(-100%);
	}
	to{
		transform:translateX(0);
	}
}



</style>
</head>

<body>
<div class="slide in reverse">test</div>
</body>
</html>

Which seems to suggest perhaps that it is a js issue or error somewhere in applying the class to trigger the scroll.

Where did you get this slider from? If we can check the original it may give some hints.

Hi Paul,

This is where I got it from.

http://demos.jquerymobile.com/1.0/docs/pages/multipage-template.html

Hopefully can find where the root of the problem is to get it fixed up.

Really appreciate all this help, I’ve been banging my head on why this isnt working on FireFox and IE and only in Chrome and Safari.

Same as banging my head with that background issue.

Thanks,

Mike

That original version is not animating in Firefox either so it looks like it was designed that way. I can’t see a fix for it yet or whether they have just scripted it for webkit.

Ok, is there a other way I can achevice exactly what I’m trying to do a different way?

Hi Paul,

Seemed to have found another way to do it but ran into couple issues, only have homepage and services working right now as testing it still, heres the link…

http://redrhinorestoration.com/test/slide1.html

  1. My Navigation does not look like it did before not all the styles are working
  2. White space above BG on each page
  3. When resizing the window and if text is longer than the fold to where user has to scroll background just stops and white background.

So think seeing an end as it does work on FireFox now havent tested it on IE yet as I dont have a PC at my current location.

Thanks,

Mike

  1. Don’t know what it looked like before so I don’t know what you mean
  2. You need to contain your floats. A top margin is pushing down the background. On #home element, you need to add the clearfix (I would normally say overflow:hidden; but you have a set height). Google clearfix if you are unsure of what it is
  3. On #home you can change your set height of 100% (which restricts any expanding of the height aka smaller screens) to min-height: 100%;