簡單實用jQuery poshytip

來源:互聯網
上載者:User

標籤:jquery poshytip

jQuery Poshytip是一塊提示性的外掛程式,可以用來提示使用者操作,提高使用者體驗

  1. 首先去poshytip官網下載外掛程式 http://vadikom.com/demos/poshytip/

  2. 必須引入的是jQuery的js檔案和poshytip的js檔案和css檔案

  3. <link type="text/css" rel="stylesheet" href="js/poshytip-1.2/src/tip-yellow/tip-yellow.css" /><script type="text/javascript" src="js/jquery-1.7.2.min.js"></script><script type="text/javascript" src="js/poshytip-1.2/src/jquery.poshytip.min.js"></script
  4. <script type="text/javascript">$(document).ready(function(){$("#tip1").poshytip({alignX: ‘left‘, content:‘<input type="text" name="a" value="a標籤的提示" />‘});$("#username").poshytip({className: ‘tip-yellow‘,content:‘提示內容‘,showOn: ‘focus‘, alignTo: ‘target‘, alignX: ‘right‘, alignY: ‘center‘, offsetX: 10,showTimeout:1});});</script>
  5. <a id="tip1" title="這是個工具" href="#">移去看看</a><input type="text" name="username" id="username" />


  6. 這樣子的話基本就可以完成啦,下面提供參數和方法表


  7. content
    提示工具條中的內容,預設是從元素的title屬性中擷取。
    className
    提示工具條的樣式
    showTimeout
    提示工具條出現前的過渡時間
    hideTimeout
    提示工具條消失的過渡時間
    showOn
    提示工具條觸發方式,有‘hover‘, ‘focus‘, ‘none‘三種方式
    alignX
    提示工具條出現在水平方向相對當前元素的位置,有‘right‘, ‘center‘, ‘left‘, ‘inner-left‘, ‘inner-right‘
    alignY
    提示工具條出現在垂直方向相對當前元素的位置,有‘bottom‘, ‘center‘, ‘top‘, ‘inner-bottom‘, ‘inner-top‘
    offsetX
    相對X方向位移,數字
    offsetY
    相對Y方向位移,數字
    hideTimeout
    工具條消失的過渡時間


    hideTimeout
    工具條消失的過渡時間
    hideTimeout
    工具條消失的過渡時間
    offsetY
    相對Y方向位移,數字
    allowTipHover
    允許滑鼠滑向工具條上方
    fade
    是否使用漸隱漸顯動畫,true/false
    slide
    是否使用滑動動畫,true/false
    方法:show
    .poshytip(‘show‘),手動觸發顯示提示工具條
    方法:hide
    .poshytip(‘hide‘),手動觸發隱藏提示工具條
    方法:disable
    .poshytip(‘disable‘),手動觸發禁用提示工具條
    方法:enable
    .poshytip(‘enable‘),手動觸發啟用提示工具條

本文出自 “jcblock” 部落格,請務必保留此出處http://jclove.blog.51cto.com/5642636/1577591

簡單實用jQuery poshytip

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.