DEV Community

programmerabhi
programmerabhi

Posted on

Why is .nxt not acting as a selector in Jquery

https://code.sololearn.com/WA77a102a0a1/#
<!DOCTYPE html>


Page Title




</body>

$('document').ready(function(){
$(".submit").click(function(){

$("#submit").text('something');
$('#submit').addClass("nxt");
$('#submit').removeClass('submit');
// $('.quiz').text('i am working');
console.log($('#submit').hasClass('nxt'));
});
$(".nxt").click(function(){ //here is problem
$('.quiz').text('i am not working');//here is problem
console.log($('#submit').hasClass('nxt'));//here is problem

});
})

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay