DEV Community

loading...

Why is .nxt not acting as a selector in Jquery

programmerabhi
i am student of Msc CS. Currently working on many project like blog writing , app making etc
・1 min read

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

});
})

Discussion (0)