Warning: Trying to access array offset on null in /home/c6645833/public_html/monoxa.net/wp-content/themes/site/inc/mx-title.php on line 414
jQueryでHTMLタグを置換する | 開発 | 2016年10月9日 | モノグサにお灸

Warning: Trying to access array offset on null in /home/c6645833/public_html/monoxa.net/wp-content/themes/site/inc/mx-shortcodes.php on line 1947

jQueryでHTMLタグを置換する

作成日:

例として、ボタンをクリックしてulタグをolタグに置換しています。

でも、このままだとidやクラス名がキャンセルされてしまうので、事前にIDとクラス名を取得しておいて追加。

参考

favicon
Using jQuery to replace one tag with another - Stack Overflow http://stackoverflow.com/questions/7093417/using-jquery-to-replace-one-tag-with-another

物草 灸太郎
物草 灸太郎

WordPressでホームページを制作しつつ、休日は畑を耕したりDIYを楽しんでいます。

Loading...

コメントをどうぞ

  • メールアドレスが公開されることはありません。
  • コメント欄にURLは入力できません。
  • このサイトはreCAPTCHAによって保護されており、Googleのプライバシーポリシー利用規約が適用されます。