-1

I'm new in wordpress theme development, I want ask some question here, I want to make a parallax effect for my theme header like this:

TestParallax.com

this is made by using some JS code, I want to know what is the best way for WP Theme ?? using pure CSS or using JS ?? what is the most compatible for web browser ?? please help me guys ..

closed as off-topic by cybmeta, birgire, kaiser Apr 4 '16 at 11:10

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

0

You can create Parallax effect for header using pure CSS as well as jQuery. The difference between them is the loading time. CSS will load much faster than jQuery. Implementing a feature will depend on the developer/owner of the theme how they want the feature to be. My preference is that you use pure CSS rather than jQuery.

Below are the two examples one with pure CSS and other with jQuery combination:

  1. Pure CSS
  2. jQuery

Please let me know if you have any query.

  • thank's, I'm prefer for CSS to, it's more simple, thank's for this link: Pure CSS that's very helpfull – felix felix Mar 30 '16 at 2:53
  • but I'm corius, why if we use jQuery that is more slow than CSS ??? – felix felix Mar 30 '16 at 2:54
  • jQuery will load slower because whenever we create a custom theme from scratch we need to follow some rules Blocking JS and Google page speed rules. As per the rule,you JS should be called after loading whole page content – Mehul Gohil Mar 30 '16 at 4:20

Not the answer you're looking for? Browse other questions tagged or ask your own question.