<span class="grandparent">
<span class='parent'>
<span id="popUP" class="child1">
Some content for popUP
</span> <!-- 1st child has width of 390px-->
</span>
</span>
異なるオプションの場合、子スパンタグは下記のように新しいタグに置き換えられます。異なる子クラスのポップアップの幅を変更するにはどうすればいいですか?
option A) <span id="popUP" class="child2"></span>
<!-- 2nd child has popUP width of 550px-->
option B) <span id="popUP" class="child3"></span>
<!-- 3rd child has popUP width of 450px-->
option C) <span id="popUP" class="child4"></span>
<!-- 4th child has popUP width of 350px-->
JavaScriptまたはjQueryを使用して動的にポップアップの幅を変更する方法はありますか?私は.find()
メソッドを使ってみましたが、運はありません
あなたのポップアップでこれまでに使ったプラグインはどれですか? –
IDの管理は、各要素ごとに一意でなければなりません。 – Jai
@Jai ....各要素に固有のクラスを使用することができます – mvemula