execute the code if check box is checked in jquery

## IF CHECK BOX CHECKED THEN ONE BLOCK EXECUTE THE CODE , OTHERWISE OTHER BLOCK WILL EXECUTE THE CODE.


$('#checkbox-id').change(function()
{
        if(this.checked == true)
        {
            alert("checked");
        }
        else
        {
            alert("unckecked");
        }
});
Please follow and like us:
0

how to load differ image depending on screen width

<script>
if (document.documentElement.clientWidth > 940)
{
   document.write('<img class="<?php echo "ligncenter size-full ".$imgInfo[$randno][id];?>" src="<?php echo $imgInfo[$randno][src];?>" title="<?php echo $imgInfo[$randno][title];?>" alt="<?php echo $imgInfo[$randno][alt];?>" />');
}
</script>
Please follow and like us:
0