javascript - Change background image based on URL parts -
i trying add site capability, background change based on part of url using stylesheets.
example:
address/shop/index.php = background image 1 address/shop/index.php?cpath=22 = background image 2 address/shop/index.php?cpath=23 = background image 3 address/shop/index.php?cpath=24 = background image 4
any ideas? have looked @ javascript , jquery not sure on 1 choose or how go it.
it looks using php, should able without javascript. need use php's server variables.
something like
$cpath = $_get['cpath']; //this allows access query part of url if($cpath == 24){ //set background url }
Comments
Post a Comment