javascript - How to hide and show images drawn on canvas on event? -
i drawn images on canvas passing x , y co-ordinates json. want hide images if checked checkbox button , want show if un-checked checkbox button.
so appreciate if hints.
using jquery can hide show image div following way can this.
$(document).ready(function () { $("#map_canvas").hide(); $("#map_checkbox").click(function () { if ($("#map_checkbox").is(":checked")) { $("#map_canvas").show(); } else if ($("#map_checkbox").not(":checked")) { $("#map_canvas").hide(); } }) });
note: in above code #map_canvas canvas div attribute id=map_canvas. , #map_checkbox checkbox attribute id=#map_checkbox.
Comments
Post a Comment