Guest User

Untitled

a guest
Feb 24th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. div>
  2. <div class="sidebar-menu">
  3. <nav>
  4. <ul>
  5. <li><a href="index.html" class="active">Home</a></li>
  6. <li><a href="about.html">About me</a></li>
  7. <li class="dropdown">
  8. <a href="portfolio.html">Portfolio</a>
  9. <i class="fa fa-chevron-down"></i>
  10.  
  11. <ul class="dropdown-menu">
  12. <li><a href="#"><i class="fa fa-chevron-right"></i>Fashion</a></li>
  13. <li><a href="#"><i class="fa fa-chevron-right"></i>Beauty</a></li>
  14. <li><a href="#"><i class="fa fa-chevron-right"></i>Wedding</a></li>
  15. <li><a href="#"><i class="fa fa-chevron-right"></i>Tests</a></li>
  16. <li><a href="#"><i class="fa fa-chevron-right"></i>Travel</a></li>
  17. <li><a href="#"><i class="fa fa-chevron-right"></i>Single Project</a></li>
  18. </ul>
  19. </li>
  20. <li><a href="services.html">Services</a></li>
  21. <li><a href="contacts.html">Contact me</a></li>
  22. </ul>
  23. </nav>
  24.  
  25. $(function(){
  26.  
  27. var chevron = $('.fa-chevron-down');
  28. var dropDown = $('.dropdown-menu');
  29. var drop = $('.dropdown > a');
  30.  
  31. drop.on('mouseover', function(){
  32. $(this).css({
  33. 'background' : '#E50A0A',
  34. 'color' : '#fff'
  35. });
  36. chevron.css({
  37. 'color' : '#fff'
  38. });
  39. });
  40. drop.on('mouseout', function(){
  41. $(this).css({
  42. 'background' : '#fff',
  43. 'color' : '#191919'
  44. });
  45. chevron.css({
  46. 'color' : '#ccc'
  47. });
  48. });
  49.  
  50. chevron.on('mouseover', function(){
  51. $(this).css({
  52. 'color' : '#fff'
  53. });
  54. $(this).prev('a').css({
  55. 'background' : '#E50A0A',
  56. 'color' : '#fff'
  57. });
  58. });
  59. chevron.on('mouseout', function(){
  60. $(this).css({
  61. 'color' : '#ccc'
  62. });
  63. $(this).prev('a').css({
  64. 'background' : '#fff',
  65. 'color' : '#191919'
  66. });
  67. });
Add Comment
Please, Sign In to add comment