194 posts
  • Bought between 100 and 499 items
  • Has been a member for 5-6 years
  • United States
ace2296 says

My website is http://hgrsolutions.com.

The second section down you will see some green circles. I am using a parallax effect to move the circles. My website has a 98% width, so the windows re size when you re size your browser window. The issue I have run into is that the green circles (parallax) are still holding their x position when you re size the browser window. In other words, it doesn’t stay centered with the window. It seems like the only way around this is to set a fixed width for the site :/ Which I don’t really want to because it is meant to be a wide site.

Is there a javascript solution to keep the container (#instructor-container) that the parallax is in center at all times?

If your confused, here’s m skype user: ace2296 feel free to chat with me there :)

You should be able to view my css and java with firebug.

3748 posts
  • Won a Competition
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Repeatedly helped protect Envato Market against copyright violations
  • Exclusive Author
  • Spain
  • Referred between 200 and 499 users
+5 more
pezflash says

On parallax.js setup your var windowWidth variable to a dynamic value, getting the current/dynamic stage width instead of the fixed 1024px. Didn’t test it, but it should work.

194 posts
  • Bought between 100 and 499 items
  • Has been a member for 5-6 years
  • United States
ace2296 says

On parallax.js setup your var windowWidth variable to a dynamic value, getting the current/dynamic stage width instead of the fixed 1024px. Didn’t test it, but it should work.

Could you rewrite that line or me with a dynamic width? preferably 100%

2444 posts
  • Has been a member for 5-6 years
  • Exclusive Author
  • Europe
  • Bought between 10 and 49 items
  • Referred between 100 and 199 users
  • Sold between 100 and 1 000 dollars
  • Envato Studio (Microlancer) Beta Tester
digitalimpact says
var windowWidth = $("#instructor-container").width();
194 posts
  • Bought between 100 and 499 items
  • Has been a member for 5-6 years
  • United States
ace2296 says

var windowWidth = $("#instructor-container").width();

Take a look at it. It froze the parallax

3748 posts
  • Won a Competition
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Repeatedly helped protect Envato Market against copyright violations
  • Exclusive Author
  • Spain
  • Referred between 200 and 499 users
+5 more
pezflash says
You can’t use $ ref there.
Use screen-width http://www.w3schools.com/jsref/prop_screen_width.asp

Make it dynamic

;)

194 posts
  • Bought between 100 and 499 items
  • Has been a member for 5-6 years
  • United States
ace2296 says

You can’t use $ ref there.
Use screen-width http://www.w3schools.com/jsref/prop_screen_width.asp

Make it dynamic

;)

Still not working. Sorry lol I’m pretty new to java. Idk if I wrote it right

973 posts
  • United Kingdom
  • Attended a Community Meetup
  • Repeatedly helped protect Envato Market against copyright violations
  • Sold between 5 000 and 10 000 dollars
  • Has been a member for 3-4 years
  • Envato Studio (Microlancer) Beta Tester
  • Bought between 100 and 499 items
  • Referred between 10 and 49 users
  • Exclusive Author
aaranmcguire says

Still not working. Sorry lol I’m pretty new to java. Idk if I wrote it right

Just to let you know Java and Javascript, completely different.

194 posts
  • Bought between 100 and 499 items
  • Has been a member for 5-6 years
  • United States
ace2296 says


Still not working. Sorry lol I’m pretty new to java. Idk if I wrote it right
Just to let you know Java and Javascript, completely different.

ahh sorry javascript*. I knew that

194 posts
  • Bought between 100 and 499 items
  • Has been a member for 5-6 years
  • United States
ace2296 says

You can’t use $ ref there.
Use screen-width http://www.w3schools.com/jsref/prop_screen_width.asp

Make it dynamic

;)
Could you perhaps rewrite the line of code for me with 100% width?
by
by
by
by
by
by