[RESOLVED]show hide border of image

i have a web page that drags element from div and drop them to another div.

for the elements on the drop div. when click i add a border to it, using this code.

 $(this).css(‘border’, "dotted 1px black");

i need that when i click outside the element in the drop area (drop div) to remove the border.


you may add this script

$("#drop").click(function (e) {
    $(this).css('border', "dotted 1px black");

    var target = $("#drop");
    if(!target.is(event.target) && target.is(":visible")){
       $("#drop").css('border', "none");
      return false;

here is a example for you

Leave a Reply