質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
jQueryプラグイン

jQueryの拡張機能。 様々な種類があり、その数は膨大です。公開済みのプラグインの他にも、自作することもできます。 jQueryで利用できるようにしておくだけで、導入およびカスタマイズが比較的容易に行なえます。

JavaScript

JavaScriptは、プログラミング言語のひとつです。ネットスケープコミュニケーションズで開発されました。 開発当初はLiveScriptと呼ばれていましたが、業務提携していたサン・マイクロシステムズが開発したJavaが脚光を浴びていたことから、JavaScriptと改名されました。 動きのあるWebページを作ることを目的に開発されたもので、主要なWebブラウザのほとんどに搭載されています。

jQuery

jQueryは、JavaScriptライブラリのひとつです。 簡単な記述で、JavaScriptコードを実行できるように設計されています。 2006年1月に、ジョン・レシグが発表しました。 jQueryは独特の記述法を用いており、機能のほとんどは「$関数」や「jQueryオブジェクト」のメソッドとして定義されています。

HTML

HTMLとは、ウェブ上の文書を記述・作成するためのマークアップ言語のことです。文章の中に記述することで、文書の論理構造などを設定することができます。ハイパーリンクを設定できるハイパーテキストであり、画像・リスト・表などのデータファイルをリンクする情報に結びつけて情報を整理します。現在あるネットワーク上のほとんどのウェブページはHTMLで作成されています。

Q&A

3回答

2333閲覧

プラグイン「jquery.steps」でタイトルが不要な場合の対処法は?

beer

総合スコア19

jQueryプラグイン

jQueryの拡張機能。 様々な種類があり、その数は膨大です。公開済みのプラグインの他にも、自作することもできます。 jQueryで利用できるようにしておくだけで、導入およびカスタマイズが比較的容易に行なえます。

JavaScript

JavaScriptは、プログラミング言語のひとつです。ネットスケープコミュニケーションズで開発されました。 開発当初はLiveScriptと呼ばれていましたが、業務提携していたサン・マイクロシステムズが開発したJavaが脚光を浴びていたことから、JavaScriptと改名されました。 動きのあるWebページを作ることを目的に開発されたもので、主要なWebブラウザのほとんどに搭載されています。

jQuery

jQueryは、JavaScriptライブラリのひとつです。 簡単な記述で、JavaScriptコードを実行できるように設計されています。 2006年1月に、ジョン・レシグが発表しました。 jQueryは独特の記述法を用いており、機能のほとんどは「$関数」や「jQueryオブジェクト」のメソッドとして定義されています。

HTML

HTMLとは、ウェブ上の文書を記述・作成するためのマークアップ言語のことです。文章の中に記述することで、文書の論理構造などを設定することができます。ハイパーリンクを設定できるハイパーテキストであり、画像・リスト・表などのデータファイルをリンクする情報に結びつけて情報を整理します。現在あるネットワーク上のほとんどのウェブページはHTMLで作成されています。

0グッド

0クリップ

投稿2018/10/26 19:28

編集2022/01/12 10:55

###前提・実現したいこと
申し込みフォームなどをスライドステップに分割するプラグインに「jquery.steps」がありますが、今回はこのタイトルを削除したいです。

例えば図のようなイメージで、「名前 パスワード 確認」の部分が不要だと考えています。
イメージ説明

###対象のコード
次のHTMLにJasaScriptのような指定をすると上図のスライドステップが出来上がるプラグインでして、今回はタイトルが不要なので、HTMLのh3を削除したいのですが、ただ削除するだけではプラグインがエラーを吐き出します。

html

1<div id="#example-basic"> 2 3 <h3>名前</h3> 4 <section><input type="text"><section> 5 6 <h3>パスワード</h3> 7 <section><input type="password"><section> 8 9 <h3>確認</h3> 10 <section><p></p><p></p><section> 11 12</div>

js

1$("##example-basic").steps({ 2 // タイトルになる部分を指定 3 headerTag: "h3",  4 // スライドさせる部分を指定 5 bodyTag: "section", 6 // スライド方式を指定 7 transitionEffect: "slideLeft", 8 // スライドさせるボタン名を指定 9 labels: { 10 next: "次へ", 11 previous: "戻る", 12 finish: "完了!" 13 } 14 // その他いろいろ 15 autoFocus: true, 16 titleTemplate: "#title#", 17});

まぁ、ただHTMLでh3を削除しても、JavaScriptで
headerTag: "h3",
と書いてタイトルになる部分を指定しているのでエラーになるのは仕方ないとしても、

かといって公式オプションなどを見ても
headerTag: "h3"
headerTag: ""とか
headerTag: falseにすれば削除できる
といなどといった方法が見当たりません。

仕方なく現状は前述のHTMLとJavaScriptによってタイトルを出力したまま、CSSでそれを後から隠している状態です。

どなたかタイトルを削除する良い方法をご存知ないでしょうか?

###参考情報
使用例:http://4webtbt.com/001268
オプション:https://github.com/rstaib/jquery-steps/wiki/Settings

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

akihiro3

2018/10/27 14:22

htmlとcssが見てみたいので記載おねがいします
beer

2018/10/28 01:13

追記しました。
guest

回答3

0

続き

js

1 2 function I(a, b) { 3 o(a).splice(b, 1) 4 } 5 6 function J(b, c, d) { 7 var e = '<{0} class="{1}">{2}</{0}>', 8 f = r(_, c.stepsOrientation), 9 g = f === _.vertical ? " vertical" : "", 10 h = a(e.format(c.contentContainerTag, "content " + c.clearFixCssClass, b.html())), 11 i = a(e.format(c.stepsContainerTag, "steps " + c.clearFixCssClass, '<ul role="tablist"></ul>')), 12 j = h.children(c.headerTag), 13 k = h.children(c.bodyTag); 14 b.attr("role", "application").empty().append(i).append(h).addClass(c.cssClass + " " + c.clearFixCssClass + g), k.each(function (c) { 15 K(b, d, a(this), c) 16 }), j.each(function (e) { 17 N(b, c, d, a(this), e) 18 }), E(b, c, d), L(b, c, d) 19 } 20 21 function K(a, b, c, d) { 22 var e = q(a), 23 f = e + W + d, 24 g = e + X + d; 25 c._id(f).attr("role", "tabpanel")._aria("labelledby", g).addClass("body")._showAria(b.currentIndex === d) 26 } 27 28 function L(a, b, c) { 29 if (b.enablePagination) { 30 var d = '<{0} class="actions {1}"><ul role="menu" aria-label="{2}">{3}</ul></{0}>', 31 e = '<li><a href="#{0}" role="menuitem">{1}</a></li>', 32 f = ""; 33 b.forceMoveForward || (f += e.format("previous", b.labels.previous)), f += e.format("next", b.labels.next), b.enableFinishButton && (f += e.format("finish", b.labels.finish)), b.enableCancelButton && (f += e.format("cancel", b.labels.cancel)), a.append(d.format(b.actionContainerTag, b.clearFixCssClass, b.labels.pagination, f)), D(a, b, c), A(a, b, c) 34 } 35 } 36 37 function M(a, c) { 38 for (var d = a.match(/#([a-z]*)#/gi), e = 0; e < d.length; e++) { 39 var f = d[e], 40 g = f.substring(1, f.length - 1); 41 c[g] === b && R("The key '{0}' does not exist in the substitute collection!", g), a = a.replace(f, c[g]) 42 } 43 return a 44 } 45 46 function N(b, c, d, e, f) { 47 var g = q(b), 48 h = g + V + f, 49 j = g + W + f, 50 k = g + X + f, 51 l = b.find(".steps > ul"), 52 m = M(c.titleTemplate, { 53 index: f + 1, 54 title: e.html() 55 }), 56 n = a('<li role="tab"><a id="' + h + '" href="#' + k + '" aria-controls="' + j + '">' + m + "</a></li>"); 57 n._enableAria(c.enableAllSteps || d.currentIndex > f), d.currentIndex > f && n.addClass("done"), e._id(k).attr("tabindex", "-1").addClass("title"), 0 === f ? l.prepend(n) : l.find("li").eq(f - 1).after(n), 0 === f && l.find("li").removeClass("first").eq(f).addClass("first"), f === d.stepCount - 1 && l.find("li").removeClass("last").eq(f).addClass("last"), n.children("a").bind("click" + i(b), Q) 58 } 59 60 function O(b, c, d) { 61 c.saveState && a.cookie && a.cookie(U + q(b), d.currentIndex) 62 } 63 64 function P(b, c, d, e, f, g) { 65 var h = b.find(".content > .body"), 66 i = r(ab, c.transitionEffect), 67 j = c.transitionEffectSpeed, 68 k = h.eq(e), 69 l = h.eq(f); 70 switch (i) { 71 case ab.fade: 72 case ab.slide: 73 var m = i === ab.fade ? "fadeOut" : "slideUp", 74 o = i === ab.fade ? "fadeIn" : "slideDown"; 75 d.transitionElement = k, l[m](j, function () { 76 var b = a(this)._showAria(!1).parent().parent(), 77 c = n(b); 78 c.transitionElement && (c.transitionElement[o](j, function () { 79 a(this)._showAria() 80 }).promise().done(g), c.transitionElement = null) 81 }); 82 break; 83 case ab.slideLeft: 84 var p = l.outerWidth(!0), 85 q = e > f ? -p : p, 86 s = e > f ? p : -p; 87 a.when(l.animate({ 88 left: q 89 }, j, function () { 90 a(this)._showAria(!1) 91 }), k.css("left", s + "px")._showAria().animate({ 92 left: 0 93 }, j)).done(g); 94 break; 95 default: 96 a.when(l._showAria(!1), k._showAria()).done(g) 97 } 98 } 99 100 function Q(b) { 101 b.preventDefault(); 102 var c = a(this), 103 d = c.parent().parent().parent().parent(), 104 e = m(d), 105 f = n(d), 106 g = f.currentIndex; 107 if (c.parent().is(":not(.disabled):not(.current)")) { 108 var h = c.attr("href"), 109 i = parseInt(h.substring(h.lastIndexOf("-") + 1), 0); 110 u(d, e, f, i) 111 } 112 return g === f.currentIndex ? (j(d, g).focus(), !1) : void 0 113 } 114 115 function R(a) { 116 throw arguments.length > 1 && (a = a.format(Array.prototype.slice.call(arguments, 1))), new Error(a) 117 } 118 119 function S(a, b) { 120 null == b && R("The argument '{0}' is null or undefined.", a) 121 } 122 a.fn.extend({ 123 _aria: function (a, b) { 124 return this.attr("aria-" + a, b) 125 }, 126 _removeAria: function (a) { 127 return this.removeAttr("aria-" + a) 128 }, 129 _enableAria: function (a) { 130 return null == a || a ? this.removeClass("disabled")._aria("disabled", "false") : this.addClass("disabled")._aria("disabled", "true") 131 }, 132 _showAria: function (a) { 133 return null == a || a ? this.show()._aria("hidden", "false") : this.hide()._aria("hidden", "true") 134 }, 135 _selectAria: function (a) { 136 return null == a || a ? this.addClass("current")._aria("selected", "true") : this.removeClass("current")._aria("selected", "false") 137 }, 138 _id: function (a) { 139 return a ? this.attr("id", a) : this.attr("id") 140 } 141 }), String.prototype.format || (String.prototype.format = function () { 142 for (var b = 1 === arguments.length && a.isArray(arguments[0]) ? arguments[0] : arguments, c = this, d = 0; d < b.length; d++) { 143 var e = new RegExp("\{" + d + "\}", "gm"); 144 c = c.replace(e, b[d]) 145 } 146 return c 147 }); 148 var T = 0, 149 U = "jQu3ry_5teps_St@te_", 150 V = "-t-", 151 W = "-p-", 152 X = "-h-", 153 Y = "Index out of range.", 154 Z = "One or more corresponding step {0} are missing."; 155 a.fn.steps = function (b) { 156 return a.fn.steps[b] ? a.fn.steps[b].apply(this, Array.prototype.slice.call(arguments, 1)) : "object" != typeof b && b ? void a.error("Method " + b + " does not exist on jQuery.steps") : w.apply(this, arguments) 157 }, a.fn.steps.add = function (a) { 158 var b = n(this); 159 return x(this, m(this), b, b.stepCount, a) 160 }, a.fn.steps.destroy = function () { 161 return g(this, m(this)) 162 }, a.fn.steps.finish = function () { 163 h(this, n(this)) 164 }, a.fn.steps.getCurrentIndex = function () { 165 return n(this).currentIndex 166 }, a.fn.steps.getCurrentStep = function () { 167 return p(this, n(this).currentIndex) 168 }, a.fn.steps.getStep = function (a) { 169 return p(this, a) 170 }, a.fn.steps.insert = function (a, b) { 171 return x(this, m(this), n(this), a, b) 172 }, a.fn.steps.next = function () { 173 return s(this, m(this), n(this)) 174 }, a.fn.steps.previous = function () { 175 return t(this, m(this), n(this)) 176 }, a.fn.steps.remove = function (a) { 177 return H(this, m(this), n(this), a) 178 }, a.fn.steps.setStep = function () { 179 throw new Error("Not yet implemented!") 180 }, a.fn.steps.skip = function () { 181 throw new Error("Not yet implemented!") 182 }; 183 var $ = a.fn.steps.contentMode = { 184 html: 0, 185 iframe: 1, 186 async: 2 187 }, 188 _ = a.fn.steps.stepsOrientation = { 189 horizontal: 0, 190 vertical: 1 191 }, 192 ab = a.fn.steps.transitionEffect = { 193 none: 0, 194 fade: 1, 195 slide: 2, 196 slideLeft: 3 197 }, 198 bb = a.fn.steps.stepModel = { 199 title: "", 200 content: "", 201 contentUrl: "", 202 contentMode: $.html, 203 contentLoaded: !1 204 }, 205 cb = a.fn.steps.defaults = { 206 headerTag: "h1", 207 bodyTag: "div", 208 contentContainerTag: "div", 209 actionContainerTag: "div", 210 stepsContainerTag: "div", 211 cssClass: "wizard", 212 clearFixCssClass: "clearfix", 213 stepsOrientation: _.horizontal, 214 titleTemplate: '<span class="number">#index#.</span> #title#', 215 loadingTemplate: '<span class="spinner"></span> #text#', 216 autoFocus: !1, 217 enableAllSteps: !1, 218 enableKeyNavigation: !0, 219 enablePagination: !0, 220 suppressPaginationOnFocus: !0, 221 enableContentCache: !0, 222 enableCancelButton: !1, 223 enableFinishButton: !0, 224 preloadContent: !1, 225 showFinishButtonAlways: !1, 226 forceMoveForward: !1, 227 saveState: !1, 228 startIndex: 0, 229 transitionEffect: ab.none, 230 transitionEffectSpeed: 200, 231 onStepChanging: function () { 232 return !0 233 }, 234 onStepChanged: function () {}, 235 onCanceled: function () {}, 236 onFinishing: function () { 237 return !0 238 }, 239 onFinished: function () {}, 240 onContentLoaded: function () {}, 241 onInit: function () {}, 242 labels: { 243 cancel: "Cancel", 244 current: "current step:", 245 pagination: "Pagination", 246 finish: "Finish", 247 next: "Next", 248 previous: "Previous", 249 loading: "Loading ..." 250 } 251 } 252}(jQuery); 253

投稿2018/10/28 04:52

akihiro3

総合スコア955

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

0

カスタマイズは自己責任でお願いします
とりあえず、可読しやすくしておいたので読んでみてください

js

1/*! 2 * jQuery Steps v1.1.0 - 09/04/2014 3 * Copyright (c) 2014 Rafael Staib (http://www.jquery-steps.com) 4 * Licensed under MIT http://www.opensource.org/licenses/MIT 5 */ 6! function (a, b) { 7 function c(a, b) { 8 o(a).push(b) 9 } 10 11 function d(d, e, f) { 12 var g = d.children(e.headerTag), 13 h = d.children(e.bodyTag); 14 g.length > h.length ? R(Z, "contents") : g.length < h.length && R(Z, "titles"); 15 var i = e.startIndex; 16 if (f.stepCount = g.length, e.saveState && a.cookie) { 17 var j = a.cookie(U + q(d)), 18 k = parseInt(j, 0); 19 !isNaN(k) && k < f.stepCount && (i = k) 20 } 21 f.currentIndex = i, g.each(function (e) { 22 var f = a(this), 23 g = h.eq(e), 24 i = g.data("mode"), 25 j = null == i ? $.html : r($, /^\s*$/.test(i) || isNaN(i) ? i : parseInt(i, 0)), 26 k = j === $.html || g.data("url") === b ? "" : g.data("url"), 27 l = j !== $.html && "1" === g.data("loaded"), 28 m = a.extend({}, bb, { 29 title: f.html(), 30 content: j === $.html ? g.html() : "", 31 contentUrl: k, 32 contentMode: j, 33 contentLoaded: l 34 }); 35 c(d, m) 36 }) 37 } 38 39 function e(a) { 40 a.triggerHandler("canceled") 41 } 42 43 function f(a, b) { 44 return a.currentIndex - b 45 } 46 47 function g(b, c) { 48 var d = i(b); 49 b.unbind(d).removeData("uid").removeData("options").removeData("state").removeData("steps").removeData("eventNamespace").find(".actions a").unbind(d), b.removeClass(c.clearFixCssClass + " vertical"); 50 var e = b.find(".content > *"); 51 e.removeData("loaded").removeData("mode").removeData("url"), e.removeAttr("id").removeAttr("role").removeAttr("tabindex").removeAttr("class").removeAttr("style")._removeAria("labelledby")._removeAria("hidden"), b.find(".content > [data-mode='async'],.content > [data-mode='iframe']").empty(); 52 var f = a('<{0} class="{1}"></{0}>'.format(b.get(0).tagName, b.attr("class"))), 53 g = b._id(); 54 return null != g && "" !== g && f._id(g), f.html(b.find(".content").html()), b.after(f), b.remove(), f 55 } 56 57 function h(a, b) { 58 var c = a.find(".steps li").eq(b.currentIndex); 59 a.triggerHandler("finishing", [b.currentIndex]) ? (c.addClass("done").removeClass("error"), a.triggerHandler("finished", [b.currentIndex])) : c.addClass("error") 60 } 61 62 function i(a) { 63 var b = a.data("eventNamespace"); 64 return null == b && (b = "." + q(a), a.data("eventNamespace", b)), b 65 } 66 67 function j(a, b) { 68 var c = q(a); 69 return a.find("#" + c + V + b) 70 } 71 72 function k(a, b) { 73 var c = q(a); 74 return a.find("#" + c + W + b) 75 } 76 77 function l(a, b) { 78 var c = q(a); 79 return a.find("#" + c + X + b) 80 } 81 82 function m(a) { 83 return a.data("options") 84 } 85 86 function n(a) { 87 return a.data("state") 88 } 89 90 function o(a) { 91 return a.data("steps") 92 } 93 94 function p(a, b) { 95 var c = o(a); 96 return (0 > b || b >= c.length) && R(Y), c[b] 97 } 98 99 function q(a) { 100 var b = a.data("uid"); 101 return null == b && (b = a._id(), null == b && (b = "steps-uid-".concat(T), a._id(b)), T++, a.data("uid", b)), b 102 } 103 104 function r(a, c) { 105 if (S("enumType", a), S("keyOrValue", c), "string" == typeof c) { 106 var d = a[c]; 107 return d === b && R("The enum key '{0}' does not exist.", c), d 108 } 109 if ("number" == typeof c) { 110 for (var e in a) 111 if (a[e] === c) return c; 112 R("Invalid enum value '{0}'.", c) 113 } else R("Invalid key or value type.") 114 } 115 116 function s(a, b, c) { 117 return B(a, b, c, v(c, 1)) 118 } 119 120 function t(a, b, c) { 121 return B(a, b, c, f(c, 1)) 122 } 123 124 function u(a, b, c, d) { 125 if ((0 > d || d >= c.stepCount) && R(Y), !(b.forceMoveForward && d < c.currentIndex)) { 126 var e = c.currentIndex; 127 return a.triggerHandler("stepChanging", [c.currentIndex, d]) ? (c.currentIndex = d, O(a, b, c), E(a, b, c, e), D(a, b, c), A(a, b, c), P(a, b, c, d, e, function () { 128 a.triggerHandler("stepChanged", [d, e]) 129 })) : a.find(".steps li").eq(e).addClass("error"), !0 130 } 131 } 132 133 function v(a, b) { 134 return a.currentIndex + b 135 } 136 137 function w(b) { 138 var c = a.extend(!0, {}, cb, b); 139 return this.each(function () { 140 var b = a(this), 141 e = { 142 currentIndex: c.startIndex, 143 currentStep: null, 144 stepCount: 0, 145 transitionElement: null 146 }; 147 b.data("options", c), b.data("state", e), b.data("steps", []), d(b, c, e), J(b, c, e), G(b, c), c.autoFocus && 0 === T && j(b, c.startIndex).focus(), b.triggerHandler("init", [c.startIndex]) 148 }) 149 } 150 151 function x(b, c, d, e, f) { 152 (0 > e || e > d.stepCount) && R(Y), f = a.extend({}, bb, f), y(b, e, f), d.currentIndex !== d.stepCount && d.currentIndex >= e && (d.currentIndex++, O(b, c, d)), d.stepCount++; 153 var g = b.find(".content"), 154 h = a("<{0}>{1}</{0}>".format(c.headerTag, f.title)), 155 i = a("<{0}></{0}>".format(c.bodyTag)); 156 return (null == f.contentMode || f.contentMode === $.html) && i.html(f.content), 0 === e ? g.prepend(i).prepend(h) : k(b, e - 1).after(i).after(h), K(b, d, i, e), N(b, c, d, h, e), F(b, c, d, e), e === d.currentIndex && E(b, c, d), D(b, c, d), b 157 } 158 159 function y(a, b, c) { 160 o(a).splice(b, 0, c) 161 } 162 163 function z(b) { 164 var c = a(this), 165 d = m(c), 166 e = n(c); 167 if (d.suppressPaginationOnFocus && c.find(":focus").is(":input")) return b.preventDefault(), !1; 168 var f = { 169 left: 37, 170 right: 39 171 }; 172 b.keyCode === f.left ? (b.preventDefault(), t(c, d, e)) : b.keyCode === f.right && (b.preventDefault(), s(c, d, e)) 173 } 174 175 function A(b, c, d) { 176 if (d.stepCount > 0) { 177 var e = d.currentIndex, 178 f = p(b, e); 179 if (!c.enableContentCache || !f.contentLoaded) switch (r($, f.contentMode)) { 180 case $.iframe: 181 b.find(".content > .body").eq(d.currentIndex).empty().html('<iframe src="' + f.contentUrl + '" frameborder="0" scrolling="no" />').data("loaded", "1"); 182 break; 183 case $.async: 184 var g = k(b, e)._aria("busy", "true").empty().append(M(c.loadingTemplate, { 185 text: c.labels.loading 186 })); 187 a.ajax({ 188 url: f.contentUrl, 189 cache: !1 190 }).done(function (a) { 191 g.empty().html(a)._aria("busy", "false").data("loaded", "1"), b.triggerHandler("contentLoaded", [e]) 192 }) 193 } 194 } 195 } 196 197 function B(a, b, c, d) { 198 var e = c.currentIndex; 199 if (d >= 0 && d < c.stepCount && !(b.forceMoveForward && d < c.currentIndex)) { 200 var f = j(a, d), 201 g = f.parent(), 202 h = g.hasClass("disabled"); 203 return g._enableAria(), f.click(), e === c.currentIndex && h ? (g._enableAria(!1), !1) : !0 204 } 205 return !1 206 } 207 208 function C(b) { 209 b.preventDefault(); 210 var c = a(this), 211 d = c.parent().parent().parent().parent(), 212 f = m(d), 213 g = n(d), 214 i = c.attr("href"); 215 switch (i.substring(i.lastIndexOf("#") + 1)) { 216 case "cancel": 217 e(d); 218 break; 219 case "finish": 220 h(d, g); 221 break; 222 case "next": 223 s(d, f, g); 224 break; 225 case "previous": 226 t(d, f, g) 227 } 228 } 229 230 function D(a, b, c) { 231 if (b.enablePagination) { 232 var d = a.find(".actions a[href$='#finish']").parent(), 233 e = a.find(".actions a[href$='#next']").parent(); 234 if (!b.forceMoveForward) { 235 var f = a.find(".actions a[href$='#previous']").parent(); 236 f._enableAria(c.currentIndex > 0) 237 } 238 b.enableFinishButton && b.showFinishButtonAlways ? (d._enableAria(c.stepCount > 0), e._enableAria(c.stepCount > 1 && c.stepCount > c.currentIndex + 1)) : (d._showAria(b.enableFinishButton && c.stepCount === c.currentIndex + 1), e._showAria(0 === c.stepCount || c.stepCount > c.currentIndex + 1)._enableAria(c.stepCount > c.currentIndex + 1 || !b.enableFinishButton)) 239 } 240 } 241 242 function E(b, c, d, e) { 243 var f = j(b, d.currentIndex), 244 g = a('<span class="current-info audible">' + c.labels.current + " </span>"), 245 h = b.find(".content > .title"); 246 if (null != e) { 247 var i = j(b, e); 248 i.parent().addClass("done").removeClass("error")._selectAria(!1), h.eq(e).removeClass("current").next(".body").removeClass("current"), g = i.find(".current-info"), f.focus() 249 } 250 f.prepend(g).parent()._selectAria().removeClass("done")._enableAria(), h.eq(d.currentIndex).addClass("current").next(".body").addClass("current") 251 } 252 253 function F(a, b, c, d) { 254 for (var e = q(a), f = d; f < c.stepCount; f++) { 255 var g = e + V + f, 256 h = e + W + f, 257 i = e + X + f, 258 j = a.find(".title").eq(f)._id(i); 259 a.find(".steps a").eq(f)._id(g)._aria("controls", h).attr("href", "#" + i).html(M(b.titleTemplate, { 260 index: f + 1, 261 title: j.html() 262 })), a.find(".body").eq(f)._id(h)._aria("labelledby", i) 263 } 264 } 265 266 function G(a, b) { 267 var c = i(a); 268 a.bind("canceled" + c, b.onCanceled), a.bind("contentLoaded" + c, b.onContentLoaded), a.bind("finishing" + c, b.onFinishing), a.bind("finished" + c, b.onFinished), a.bind("init" + c, b.onInit), a.bind("stepChanging" + c, b.onStepChanging), a.bind("stepChanged" + c, b.onStepChanged), b.enableKeyNavigation && a.bind("keyup" + c, z), a.find(".actions a").bind("click" + c, C) 269 } 270 271 function H(a, b, c, d) { 272 return 0 > d || d >= c.stepCount || c.currentIndex === d ? !1 : (I(a, d), c.currentIndex > d && (c.currentIndex--, O(a, b, c)), c.stepCount--, l(a, d).remove(), k(a, d).remove(), j(a, d).parent().remove(), 0 === d && a.find(".steps li").first().addClass("first"), d === c.stepCount && a.find(".steps li").eq(d).addClass("last"), F(a, b, c, d), D(a, b, c), !0) 273 }

投稿2018/10/28 04:49

編集2018/10/28 04:52
akihiro3

総合スコア955

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

0

現状が理解できないので、申し訳ないですがhtmlのコードとcssのコードを見たいです

とりあえず、現状のCSSでそれを後から隠している状態とはこうですか?

css

1#example-basic h2{display:none}

jsのみで解決するのが希望でしたらこれではダメですか?

js

1$("#example-basic h2").remove();

投稿2018/10/27 14:22

akihiro3

総合スコア955

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

beer

2018/10/28 01:17 編集

ありがとうございます。 はいCSSの削除はそれです。 解決はJSやCSSでなく、そもそもHTMLにタイトルを書きたくないと考えています。
beer

2018/10/28 01:14 編集

HTMLはこんな感じです。 <div id="#example-basic"> <h3>名前</h3> <section><input type="text"><section> <h3>パスワード</h3> <section><input type="password"><section> <h3>確認</h3> <section><p></p><p></p><section> </div> この<h3></h3> を消したいのです。 (ただ消すとプラグインが作動しなくなる。)
akihiro3

2018/10/28 12:15 編集

jquery.steps.min.jsで動作する過程で#example-basicにとって必要な子要素ですね おススメしませんがjquery.steps.min.jsをカスタマイズすれば対処も可能かと思います 何でもいいので子要素が必要のようです htmlのコードに不要なのにh3タグがあるのが目立つのが気になるのでしたら 他のタグに変更は可能です htmlで変更は <!-- <h3>質問1</h3> --> <div></div> jsで変更は // headerTag: "h3", headerTag: "div", 空のdivタグは使いたくない場合は、使ってもいいと思えるタグに変更してください jquery.steps.min.jsのコードをもう一つの回答で可読しやすくしておきますね
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問