jquery - event mouseout on datepicker -
Can someone explain how this code will work
Because, I do not know if I
For the code
I need to pay more attention
Thanks, in advance, Richard
(Also, I do not know that the watt calorie is also referring to datePickerDiv and $ ('date-pick'))?
$ (function () {var cal; var $ a; var checkForMouseout = function (event) {var el = event.target; while (true) {if (el == cal) {True}; else if (el == document) {$ this.dpClose (); return false;} and {l = $ (L). Parent () [0];}}} $ $ ('date-pick ') .Date Picture () .bind (' DpDisplayed ', function (event, datePickerDiv) {cal = datePickerDiv; $ th = $ (this); $ (document) .bind (' mouseover ', checkforum layout);}) .bind ('dpClosed', function (event, selected) {$ (document). Unbreaked ('mouseover', checkforum layout);});});
This code will check if the mouse leaves the datapimer divisor and then closes it Leave the mouse left The code checks whether the element receiving the event was calendar. // el has been set up or down, the document is set globally. While (true) {// it will always return until it returns (AL == CL) {// Recipient Element Calender Return is true; // We do not have true (no ideo true and tap or 'yadad') and if (l == document) {// we check if target l documents $ this.dpClose (); // element is closed return false; // flame to leave)} and {// L is neither call or document L = $ (L). Parent () [0]; // IIM of Current L and Relay}} You should put this code in the head of your document.
The code will be easy:
$ ('date-pick') .Date picture (.) .bund ('DPDSPlay', function (Event, Date Picture) { Cal = datePickerDiv; // datepickerdiv should catch the Datapak Diva somehow, like something: $ ('date-pick') [0]; $ this = $ (this); $ (cal) .mouseleave (function () { $ (This) .dpClose ();})}}
A better question is why do not you want to include that code, which you do not know What does this do?
Note: This code is very ugly and you can get it back Thinking should be considered.
Comments
Post a Comment