Advertisement
Guest User

Untitled

a guest
May 28th, 2016
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.72 KB | None | 0 0
  1. <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
  2.  
  3. <script type="text/javascript" src="//cdn.jsdelivr.net/jquery.mixitup/latest/jquery.mixitup.min.js?v=2.1.9"></script>
  4.  
  5. <div class="controls">
  6. <label>Filter:</label>
  7.  
  8. <button class="filter" data-filter="all">All</button>
  9. <button class="filter" data-filter=".category-1">Category 1</button>
  10. <button class="filter" data-filter=".category-2">Category 2</button>
  11.  
  12. <label>Sort:</label>
  13.  
  14. <button class="sort" data-sort="myorder:asc">Asc</button>
  15. <button class="sort" data-sort="myorder:desc">Desc</button>
  16. </div>
  17. <div id="Container" class="container">
  18. <div class="mix category-1" data-myorder="1"></div>
  19. <div class="mix category-1" data-myorder="2"></div>
  20. <div class="mix category-1" data-myorder="3"></div>
  21. <div class="mix category-2" data-myorder="4"></div>
  22. <div class="mix category-1" data-myorder="5"></div>
  23. <div class="mix category-1" data-myorder="6"></div>
  24. <div class="mix category-2" data-myorder="7"></div>
  25. <div class="mix category-2" data-myorder="8"></div>
  26.  
  27. <div class="gap"></div>
  28. <div class="gap"></div>
  29. </div>
  30.  
  31. *{
  32. -webkit-box-sizing: border-box;
  33. -moz-box-sizing: border-box;
  34. box-sizing: border-box;
  35. }
  36.  
  37. body, button{
  38. font-family: 'Helvetica Neue', arial, sans-serif;
  39. }
  40.  
  41. .controls{
  42. padding: 2%;
  43. background: #333;
  44. color: #eee;
  45. }
  46.  
  47. label{
  48. font-weight: 300;
  49. margin: 0 .4em 0 0;
  50. }
  51.  
  52. button{
  53. display: inline-block;
  54. padding: .4em .8em;
  55. background: #666;
  56. border: 0;
  57. color: #ddd;
  58. font-size: 16px;
  59. font-weight: 300;
  60. border-radius: 4px;
  61. cursor: pointer;
  62. }
  63.  
  64. button.active{
  65. background: #68b8c4;
  66. }
  67.  
  68. button:focus{
  69. outline: 0 none;
  70. }
  71.  
  72. button + label{
  73. margin-left: 1em;
  74. }
  75.  
  76. .container{
  77. padding: 2% 2% 0;
  78. text-align: justify;
  79. font-size: 0.1px;
  80. background: #68b8c4;
  81.  
  82. -webkit-backface-visibility: hidden;
  83. }
  84.  
  85. .container:after{
  86. content: '';
  87. display: inline-block;
  88. width: 100%;
  89. }
  90.  
  91. .container .mix,
  92. .container .gap{
  93. display: inline-block;
  94. width: 49%;
  95. }
  96.  
  97. .container .mix{
  98. text-align: left;
  99. background: #03899c;
  100. margin-bottom: 2%;
  101. display: none;
  102. }
  103.  
  104. .container .mix.category-1{
  105. border-top: 2px solid limegreen;
  106. }
  107.  
  108. .container .mix.category-2{
  109. border-top: 2px solid yellow;
  110. }
  111.  
  112. .container .mix:after{
  113. content: attr(data-myorder);
  114. color: white;
  115. font-size: 16px;
  116. display: inline-block;
  117. vertical-align: top;
  118. padding: 4% 6%;
  119. font-weight: 700;
  120. }
  121.  
  122. .container .mix:before{
  123. content: '';
  124. display: inline-block;
  125. padding-top: 60%;
  126. }
  127.  
  128. @media all and (min-width: 420px){
  129. .container .mix,
  130. .container .gap{
  131. width: 32%;
  132. }
  133. }
  134.  
  135. @media all and (min-width: 640px){
  136. .container .mix,
  137. .container .gap{
  138. width: 23.5%;
  139. }
  140. }
  141.  
  142. $(function(){
  143. $('#Container').mixItUp();
  144. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement