Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ラベルをクリックすると、ajax リクエストsucceessのコードを記述し、関数で使用してクラスを変更するコードを記述しますが、機能$(this)しません。なんで?そしてそれを達成する方法は?
succeess
$(this)
ajaxリクエストが成功した後の関数では、このように使用しました。
function (result,clickedElement) { if (result == "True") { $(clickedElement).removeClass("myclass").addClass("Yourclass"); } }