jquery - Problem binding mouse events -


I have a table of images each row, when it is folded, its image is hidden in the first hidden device Which is fully deployed. Now when I have a mouse on the image shown, I want to break the tr mouseleave events so that the image does not flicker and then when I leave the image div, then reboot the mouselevel event.

I am able to unbind the mouseover event, but due to ribbing, flicker is generated. Relevant code:

  & lt; Table range = "1" id = "photoTable" & gt; & Lt; Tbody & gt; & Lt; Tr class = "item" & gt; & Lt; Td class = "filename" & gt; GraphDataCAQ3UW88.png & lt; / Td> & Lt; / TR & gt; & Lt; / Tbody & gt; & Lt; / Table & gt; & Lt; Div id = "this photo" & gt; & Lt; / Div & gt;   

CSS:

  #thisphoto {display: none; Status: Completed; Left: 250px; Top: 150px; Limit: 1px solid black; Background color: white; Padding: 20px; Z-index: 2; }   

js:

  $ (document) .ready (function () {(function ($) {$ .fn.getThisPhoto = function () {Return $ (this) .each (function () {// I have left the code that gets data to pass $ $. Get () $. Get ('admin / photo management / this photo cfm ', Data, function (response) {$ (' # thisPhoto ') .html (feedback) Show ();});})}}}}} (jQuery); $ (' tr.item '). (Function () {$ (This) .get thisPhoto ();}, function () {$ ('# thisPhoto') Hide ();}); $ ('# thisPhoto'). Mousecenter (function () { $ ('Tr (' Mouseleave ');}) .Moveleave (function () {$ (' tr.it Em ') .bind (' mouseleave ', function () {$ (' # thisPhoto '). Hide ();});});});   

Edit: I By wrapping the whole epoxy in a div and mousewooting it on the design, by trimming the (and bind) function triggered ... No, exactly what I wanted, but it will do it in a pinch.

I am unsure whether this model will work for your needs, but div # thisPhoto Individual within tr div . In this way, when you are placed on the image, you are still going through a table row, for example, the markup would be something like this:

   & Lt; / Div & gt; Image001.jpg & lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; TD & gt; & Lt; Div class = "thephoto" & gt; & Lt; Img src = "http://www.mysite.com/images/Image002.jpg" /> & Lt; / Div & gt; Image002.jpg & lt; / Td> & Lt; / TR & gt;   

If you give div.thephoto a position: relative style, then you div.thePhoto & gt; IMG A Position: Full style and position relative to top left corner of table cell like this, you can only .hover () event in each table row < Code> .find ("div.thephoto") to display or hide your child img element.

For example see.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -