1

I have a div and when click it ,it goes to fetch some information from server and put themes to itself content to show it to user it works fine but I do not know how to handle it ,when user clicked on other part of page cancel this event that fired?

 <div id="picdiv" onmouseover="getit(this,'123')"></div>

my function:

function getit(picdiv, pid) {

  $('#picdiv').html('please wait...');

 $.ajax({
    url: "/Getcontent",
    type: 'POST',
    dataType: 'json',
    data: null,
    contentType: 'application/json; charset=utf-8',
    success: function (content) {
        $('#picdiv').html(content);

    },
    error: function (content) {
       //do something
    }
   });
}
Praveen
  • 55,303
  • 33
  • 133
  • 164
motevalizadeh
  • 5,244
  • 14
  • 61
  • 108

0 Answers0