WordPressに関する情報や技術紹介です

Using jQuery with WordPress

Currently, WordPress is used as the Ajax library jQuery.
Jquery.js is loaded automatically when you check the <header> to display the home page even when (maybe). Not loaded. For more information click here Please check the.
If you want to use yourself as a jQuery is loaded in such automatic, only one note.

And to jQuery () instead of $ ()!

My version of WordPress is a 2.7-beta3, was very troubled by not being recognized is "$ ()" when I attempt to use the jQuery. I worried about the problem and finally I · · ·, for some reason, I was able to understand that if you use "() jQuery" finally.

Maybe not a "natural such a thing", I do not know I was bad ... head.

I think measures to avoid a conflict with the "$ ()" on "prototype.js" probably.

Easy to use now as shown below in Okagesama!


Turns off. And displayed.

Here will appear or disappear.

On the following source.

<span onclick="jQuery('#test-div').hide('normal')" style="cursor: pointer;">消します。</span><span onclick="jQuery('#test-div').show('normal')" style="cursor: pointer; margin-left: 20px;">表示します。</span>
<div id="test-div" style="border: 1px solid #ff6600; background-color: #ffcc66; padding: 10px;">
ここが消えたり<br />
現れたります。
</div>
タグ
,
トラックバックURL

Leave a Reply

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

*

次のHTML タグと属性が使えます: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

ページTOPに戻る