I have a checkbox. When it is checked, a paragraph appears. When it is unchecked, it hides. There is no problem about it. What the problem is: if I check the checkbox, when I press F5(refresh) button, checkbox is still checked but paragraph is hided. I want to make paragraph appear when I refresh page.
Here is HTML:
<input type="checkbox" id="something">
<p id="info" style="display:none">Yes ,checkbox is checked now...</p>
Here is Jquery :
$(document).ready(function() {
$("#something").change( function(){
if( $(this).is(':checked') ) {
$("#info").show();
} else {
$("#info").hide();
}
});
});
You just have to trigger the event