こんにちは、コブラです。 HTML作ってて、 Javascriptで「element.dispatchevent is not a function」というエラーが出ました。 なんのこっちゃ分からず調べると、 どうやらprototype.jsとjQuery.jsが競合しているらしい。 どっちも使いたいのにー!と思っていたら、 解決策がありました! prototype.jsと同時に使うには – jQuery日本語リファレンス この後者のやり方を採用しました。 <script><!-- jQuery.noConflict(); jQuery(document).ready(function($){ // ここでは、$はjQueryとして使えます。 }); // ここでは、$はprototype.jsの動作をします。 //--> </script> これは便利! Javascriptエラーって何
ドラッグ、ドロップでテーブルやリスト要素を順番変更する【jQuery UI Sortableモジュール】というのがあります。 ● JQUERY SORTABLE http://jqueryui.com/demos/sortable/ http://jqueryui.com/download ←ダウンロードはこちら js <script type="text/javascript" src="jquery.min.js"></script> <script type="text/javascript" src="jquery-ui-1.8.xxxxx.js"></script> <script type="text/javascript"> $(function(){ $("#sortable").sortable({ revert: true , cursor : 'move' , tol
スポンサードリンク 概要 フォーム(form)の値を取得する場合、jQueryではval()メソッドやprop()メソッドを使う。 ただし、inputの種類によって癖があるので、各typeにおける「値取得」「値設定」などをメモする。 また、prop()を利用するのでjQueryのバージョンには注意が必要。 このコードを試したときのバージョンは「1.10.1」。 テキスト val()メソッドを使だけ。未入力の場合は、「""」(空文字)なので安全。 HTML <input type="text" name="animalText"> 値取得 var newText = 'トラ';$(':text[name="animalText"]').val(newText); 値設定 var animal = $(':text[name="animalText"]').val(); ラジオ val()メソ
I'd like to change the value of the onclick attribute on an anchor. I want to set it to a new string that contains JavaScript. (That string is provided to the client-side JavaScript code by the server, and it can contains whatever you can put in the onclick attribute in HTML.) Here are a few things I tried: Using jQuery attr("onclick", js) doesn't work with both Firefox and IE6/7. Using setAttribu
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く