5
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

実装ついでに【ポップアップ ヘルプ】をつけとく_(・・_*)

Last updated at Posted at 2014-08-02

あとから、「仕様なんだっけ?」と思いそうなところや、
「ユーザーが分かりにくそう」というところには、なるべく実装のついでに
ポップアップヘルプを残しておけばあとあと楽・・なハズ☆

ポップアップメッセ.png

<script src="/app/webroot/js/bootstrap.js"></script>
$(function() {
   $('[rel=popover]').popover();
});

<i class="icon-question-sign popover-test" role="" rel="popover" data-html="true"  data-content="ヘルプメッセージ" data-placement="right"></i>

 

ヘルプアイコン

Twitterbootstrap のicon-question-sign  ※バージョンによって指定名が変わるので注意
 ↓ 
icon-question-sign.png

参考 :http://php-fan.org/sample_code_demo/bootstrap.html

 

ポップアップメッセージの出し方

基本オプション
data-content="メッセ"表示したいメッセージをこれにあてる。

data-html="true" をいれると、data-content のなかで<br>がきくようなる。

data-placement="right"ポップアップ吹き出しをどの方向に出すか

他オプション参考:http://www.matomater.com/441/

5
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?