try adding below code on "onReady" function.
jQuery("#NextButton").click(function(){
if(jQuery(".q-checked").length == 0)
{
alert("Please provide answer")
}
});
@Mohammedali_Rajapakar_Ugam - That won't stop the page from advancing after the alert.
@salimlko - Assuming your addOnUnload code was correct, change addOnUnload to addOnPageSubmit.
@TomG ... Good catch.
However, I asked
@salimlko to try it, if it doesn't work then we can look into it in more detail...