Created
June 8, 2013 19:20
-
-
Save kenji0x02/5736290 to your computer and use it in GitHub Desktop.
jQueryで1回だけ実行。ボタンを押したときに、初回だけhtmlを追加するときとかに超便利w (例)「ソーシャルボタン表示」ボタンを押したときに、はてなブックマークのソーシャルボタンを追加←だって、これだけSSL対応してないからエラーでるんだもん><
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() { | |
// ボタン・クリック時に1度だけ反映 | |
$('#btn').one('click', | |
function(e) { | |
window.alert('クリックされました!'); | |
$('.social-btn').append('<div class="hatena"><a>はてなのソーシャルボタンの設定</a></div>'); | |
} | |
); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
はてなブックマークのソーシャルボタンはSSLに対応してくれました^^/
http://bookmark.hatenastaff.com/entry/2013/06/12/192954