Guest User

Untitled

a guest
Dec 18th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. .example1 {
  2. display: block
  3. }
  4.  
  5. .example1 {
  6. display: none
  7. }
  8.  
  9. $page= substr($url, strrpos($url, '/') + 1);
  10.  
  11. <?php
  12. if($page = "page123")
  13. echo css file
  14. else
  15. //Echo another css file
  16. ?>
  17.  
  18. var url = window.location.href;
  19. var param = url.splice('?')[1]; // Get your class "ex example1"
  20.  
  21. $('body').addClass(param);
  22.  
  23. var urlparam = "?" + param;
  24.  
  25. body.example1 div.foo {
  26. display: none
  27. }
  28.  
  29. body.example2 div.foo {
  30. display: block
  31. }
Add Comment
Please, Sign In to add comment