shababshihan

একরডিয়ন এর ব্যবহার

May 12th, 2015
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.39 KB | None | 0 0
  1. একরডিয়ন এর ব্যবহারঃ
  2. -----------------
  3. ধাপ-১ঃ একরডিয়ন দুই ভাবে ব্যবহার করা যায়ঃ প্লাগিন ও সিএসএস স্টাইল করে । আমি আমার পছন্দ মত ব্যবহার করবো ।
  4. ------
  5. ধাপ-২ঃ index.html , style.css ও jQuery তে কমান্ড করা ।
  6. ------
  7. ধাপ-৩ঃ প্লাগিন ব্যবহার করলে লিঙ্ক গুলো বডিতে ব্যবহার করতে হতঃ <link rel="stylesheet" type="text/css" href="css/jquery-ui.css" media="all" />
  8. ------ <script type="text/javascript" src="js/jquery-ui.js"></script>
  9. ----------------------------------------------------------------------------------------------------------------------------------------
  10. উদাহরণঃ
  11. index.html
  12. =========
  13. <div class="accrodion_container fix">
  14. <div class="accordion_head active fix">
  15. <h2>Accordion Heading 1</h2>
  16. <div class="accrod_icons">
  17. <span class="icon_minus"></span>
  18. <span class="icon_plus"></span>
  19. </div>
  20. </div>
  21. <div class="accordion_body fix">
  22. <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
  23. </div>
  24. <div class="accordion_head fix">
  25. <h2>Accordion Heading 2</h2>
  26. <div class="accrod_icons">
  27. <span class="icon_minus"></span>
  28. <span class="icon_plus"></span>
  29. </div>
  30. </div>
  31. <div class="accordion_body fix">
  32. <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
  33. </div>
  34. <div class="accordion_head fix">
  35. <h2>Accordion Heading 3</h2>
  36. <div class="accrod_icons">
  37. <span class="icon_minus"></span>
  38. <span class="icon_plus"></span>
  39. </div>
  40. </div>
  41. <div class="accordion_body fix">
  42. <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
  43. </div>
  44. <div class="accordion_head fix">
  45. <h2>Accordion Heading 4</h2>
  46. <div class="accrod_icons">
  47. <span class="icon_minus"></span>
  48. <span class="icon_plus"></span>
  49. </div>
  50. </div>
  51. <div class="accordion_body fix">
  52. <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
  53. </div>
  54. </div>
  55.  
  56. -------------------------------------------------------------------------------------------------------------------------------
  57. style.css
  58. ---------
  59. /* Accordion Style */
  60. .accrodion_container{}
  61. .accordion_head{
  62. padding: 10px;
  63. background: #ddd;
  64. border: 1px solid #ccc;
  65. cursor: pointer;
  66. margin-top: 15px;
  67. position: relative;
  68. }
  69. .accordion_head:first-child{margin-top: 0px;}
  70. .accordion_head h2{
  71. margin: 0px;
  72. font-size: 25px;
  73. line-height: 30px;
  74. font-weight: 100;
  75. text-transform: uppercase;
  76. }
  77. .accrod_icons{
  78. position: absolute;
  79. top: 25px;
  80. right: 20px;
  81. }
  82. span.icon_minus{
  83. width: 24px;
  84. height: 2px;
  85. background: #000;
  86. display: block;
  87. }
  88. span.icon_plus{
  89. display: block;
  90. position: absolute;
  91. height: 22px;
  92. width: 2px;
  93. background: #000;
  94. left: 11px;
  95. top: -10px;
  96. opacity: 1;
  97. -webkit-transition: all .5s;
  98. transition: all .5s;
  99. }
  100. .accordion_head.active span.icon_plus{
  101. opacity: 0;
  102. }
  103. .accordion_body{
  104. padding: 20px;
  105. border: 1px solid #333;
  106. background: #000;
  107. color: #fff;
  108. display: none;
  109. }
  110. .accordion_body p{
  111. margin: 0px;
  112. margin-bottom: 15px;
  113. }
  114. .accordion_body p:last-child{margin-bottom: 0px;}
  115. ----------------------------------------------------------------------------------------------------------------
  116. jQuery কমান্ডঃ
  117. -------------
  118. // Custom js Accordion
  119. $(document).ready(function() {
  120. // All Accordion Body hidden
  121. $('div.accordion_body').hide();
  122. // Only Accordion Body First Child Show
  123. $('div.accordion_body:first').show();
  124. // Accordion Click Function
  125. $('div.accordion_head').on('click', function() {
  126. if($(this).next().is(':hidden')){ // Jodi Accordion body hide thake
  127. $('div.accordion_body').slideUp().prev().removeClass('active');// all Accordion body slideup
  128. $(this).addClass('active').next().slideDown();// this heading accordion body slidedown
  129. } else{
  130. $(this).removeClass('active').next().slideUp();// else accordion body slideup
  131. }
  132. });
  133. });
Advertisement
Add Comment
Please, Sign In to add comment