Last active
August 29, 2015 14:25
-
-
Save 14021939/1678a1031ad2c7cfd021 to your computer and use it in GitHub Desktop.
jquery UI Tooltipで独自のクラスを指定してスタイルを設定する ref: http://qiita.com/14021939/items/ab1b5910373e31118a54
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.ui-tooltip{background: #F2FBEF} | |
.ui-tooltip1{color:red;} | |
.ui-tooltip2{font-style: italic;} | |
.ui-tooltip3{font-weight:borld;} | |
.ui-tooltip-test{background:red;color:white;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p>これは<a class="test1" href="#" title="てすと1">ツールチップのテスト</a>です。ツールチップごとに異なるスタイルを指定しています。</p> | |
<p>これは<a class="test2" href="#" title="てすと2">ツールチップのテスト</a>です。ツールチップごとに異なるスタイルを指定しています。</p> | |
<p>これは<a class="test3" href="#" title="てすと3">ツールチップのテスト</a>です。ツールチップごとに異なるスタイルを指定しています。</p> | |
<p>共通のstyleは".ui-tooltip"クラスで指定しています。</p> | |
<p><label for="test">test:</label><input id="test" title="test" /></p> | |
<p>リンクやフィールドをマウスオーバーするとツールチップが表示されます。</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
$(".test1").tooltip({ | |
tooltipClass:"ui-tooltip1" | |
}); | |
$(".test2").tooltip({ | |
tooltipClass:"ui-tooltip2" | |
}); | |
$(".test3").tooltip({ | |
tooltipClass:"ui-tooltip3" | |
}); | |
$("#test").tooltip({ | |
tooltipClass:"ui-tooltip-test" | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment