Advertisement
shababshihan

টুলটিপ প্লাগিন এর বাবহার

May 13th, 2015
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.00 KB | None | 0 0
  1. টুলটিপ প্লাগিন এর বাবহারঃ
  2.  
  3. টুলটিপ দুই ভাবে ব্যবহার করা যায়... প্লাগিন দিয়ে ও সিএসএস স্টাইল করে ।
  4.  
  5. সিএসএস স্টাইল করে করলেঃ
  6. ---------------------
  7. ধাপ--১ প্রথমে প্রয়োজন মত স্থানে html মারকাপ রেডি করতে হবে ।
  8. -----
  9. ধাপ--২ ইচ্ছে মত সিএসএস স্টাইল করতে হবে ।
  10. -----
  11.  
  12. প্লাগিন দিয়ে করলেঃ
  13. --------------------
  14. ধাপ--৩ পছন্দ মত টুলটিপ প্লাগিন ডাউনলোড করলাম । যেমনঃ tooltipster-master
  15. -------
  16. ধাপ--৪ সিএসএস লিঙ্ক করালাম । যেমনঃ <link rel="stylesheet" type="text/css" href="css/tooltipster.css" media="all" />
  17. -------
  18. ধাপ--৫ বডিতে <script type="text/javascript" src="js/jquery-1.11.3.min.js"></script>
  19. <script type="text/javascript" src="js/jquery.tooltipster.min.js"></script>
  20. <script type="text/javascript" src="js/main.js"></script>
  21. টুলটিপ প্লাগিন ও jquery কল করলাম ।
  22.  
  23.  
  24. উদাহরণঃ
  25.  
  26. সিএসএস স্টাইল করে করলেঃ
  27. =====================
  28. html মারকাপ
  29. ----------
  30. <!-- Tooltips Contact Start Here -->
  31. <div class="tooltips_content_area fix">
  32. <div class="tooltips_content_wrapper fix">
  33. <a href="#" title="Lorem Ipsum is simply dummy text of the">Tooltips</a>
  34. <a href="#" title="the printing and typesetting industry. Lorem">Tooltips 2</a>
  35. <a href="#" title="orem 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">Tooltips 3</a>
  36. <div class="jquery_tooltips fix">
  37. <a href="#" title="Lorem Ipsum is simply dummy text of the" class="tooltips">Tooltips</a>
  38. <a href="#" title="&lt;div class=&quot;tooltip_left fix&quot;&gt; &lt;img src=&quot;img/chele.jpg&quot; /&gt; &lt;/div&gt; &lt;div class=&quot;tooltip_right fix&quot;&gt;&lt;strong&gt; This text is in bold case ! &lt;/strong&gt; &lt;p&gt; 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. &lt;/p&gt;&lt;/div&gt;" class="tooltips2">Tooltips 2</a>
  39. <a title="Right" class="tooltips3">Right</a>
  40. <a title="Left" class="tooltips4">Left</a>
  41. <a title="Bottom" class="tooltips5">Bottom</a>
  42. <a title="Top Right" class="tooltips6">Top Right</a>
  43. <a title="Bottom Right" class="tooltips7">Bottom Right</a>
  44. </div>
  45. </div>
  46. </div>
  47. <!-- Tooltips Contact Start Here -->
  48. ----------------------------------------------------------------------------------
  49. সিএসএস স্টাইলঃ
  50. ------------
  51. /* Tooltips Style */
  52. .tooltips_content_area{
  53. margin-top: 50px;
  54. margin-bottom: 50px;
  55. }
  56. .tooltips_content_wrapper{}
  57. .tooltips_content_wrapper a{
  58. display: inline-block;
  59. padding: 12px 20px;
  60. margin-right: 20px;
  61. text-decoration: none;
  62. color: #fff;
  63. background: #000;
  64. text-transform: uppercase;
  65. font-size: 16px;
  66. line-height: 22px;
  67. letter-spacing: 5px;
  68. min-width: 200px;
  69. text-align: center;
  70. position: relative;
  71. }
  72. .jquery_tooltips {
  73. }
  74. .jquery_tooltips a{
  75. margin-top: 30px;
  76. cursor: pointer;
  77. }
  78. .tooltips_content_wrapper a:hover:before, .tooltips_content_wrapper a:hover:after {
  79. opacity: 1;
  80. }
  81. .tooltips_content_wrapper a:last-child{
  82. margin-right: 0px;
  83. }
  84. .tooltips_content_wrapper>a:before{
  85. content:attr(title);
  86. position: absolute;
  87. bottom: 100%;
  88. left: 50%;
  89. background: #333;
  90. text-transform: capitalize;
  91. padding: 10px;
  92. border-radius: 5px;
  93. width: 200px;
  94. display: block;
  95. margin-left: -110px;
  96. margin-bottom: 12px;
  97. -webkit-transition: all .5s;
  98. transition: all .5s;
  99. opacity: 0;
  100. font-size: 14px;
  101. line-height: 18px;
  102. letter-spacing: 0px;
  103. }
  104. .tooltips_content_wrapper>a:after{
  105. content:'';
  106. display: block;
  107. position: absolute;
  108. left: 50%;
  109. bottom: 100%;
  110. border-top: 12px solid #333;
  111. border-left: 10px solid transparent;
  112. border-right: 10px solid transparent;
  113. margin-left: -10px;
  114. opacity: 0;
  115. -webkit-transition: all .5s;
  116. transition: all .5s;
  117. }
  118. a.tooltips{
  119. }
  120. a.tooltips2{}
  121. a.tooltips3{}
  122. ===========================================================================================================================================
  123.  
  124. প্লাগিন দিয়ে করলেঃ
  125. ----------------
  126. সিএসএস স্টাইলঃ
  127. -------------
  128. /* This is how you would create a theme called "my-custom-theme": */
  129. .mytooltips_theme {
  130. border-radius: 5px;
  131. border: 2px solid #333;
  132. background: #000;
  133. color: #fff;
  134. max-width:300px;
  135. }
  136. /* Use this next selector to style things like font-size and line-height: */
  137. .mytooltips_theme .tooltipster-content {
  138. font-family: Arial, sans-serif;
  139. font-size: 14px;
  140. line-height: 16px;
  141. padding: 8px 10px;
  142. }
  143. .mytooltips_theme .tooltipster-content .tooltip_left{
  144. float:left;
  145. width:40%;
  146. height:auto;
  147. }
  148. .mytooltips_theme .tooltipster-content .tooltip_left img{}
  149. .mytooltips_theme .tooltipster-content .tooltip_right{
  150. float:left;
  151. width:56%;
  152. margin-left:4%;
  153. height:auto;
  154. }
  155. .mytooltips_theme .tooltipster-content .tooltip_right{}
  156. .mytooltips_theme .tooltipster-content .tooltip_right strong{
  157. margin-bottom:10px;
  158. }
  159. .mytooltips_theme .tooltipster-content .tooltip_right p{}
  160. ----------------------------------------------------------------------
  161.  
  162. jquery কমান্ডঃ
  163. -----------
  164.  
  165. // Tooltips js
  166. $(document).ready(function() {
  167. $('a.tooltips').tooltipster();
  168. $('a.tooltips2').tooltipster({
  169. contentAsHTML: true,
  170. animation: 'grow',
  171. delay: 200,
  172. theme: 'mytooltips_theme',
  173. touchDevices: false,
  174. trigger: 'hover'
  175. });
  176. $('a.tooltips3').tooltipster({
  177. animation: 'fall',
  178. delay: 200,
  179. theme: 'mytooltips_theme',
  180. touchDevices: false,
  181. trigger: 'click',
  182. position: 'right',
  183. });
  184. $('a.tooltips4').tooltipster({
  185. animation: 'swing',
  186. delay: 200,
  187. theme: 'mytooltips_theme',
  188. touchDevices: false,
  189. trigger: 'click',
  190. position: 'left',
  191. });
  192. $('a.tooltips5').tooltipster({
  193. animation: 'slide',
  194. delay: 200,
  195. theme: 'mytooltips_theme',
  196. touchDevices: false,
  197. trigger: 'hover',
  198. position: 'bottom',
  199. });
  200. $('a.tooltips6').tooltipster({
  201. animation: 'fade',
  202. delay: 200,
  203. theme: 'mytooltips_theme',
  204. touchDevices: false,
  205. trigger: 'hover',
  206. position: 'top-right',
  207. });
  208. $('a.tooltips7').tooltipster({
  209. animation: 'fade',
  210. delay: 200,
  211. theme: 'mytooltips_theme',
  212. touchDevices: false,
  213. trigger: 'hover',
  214. position: 'bottom-right',
  215. });
  216. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement