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)