The first effect is as follows:
The code is as follows:
This is a loop, looping all TD labels named XX (that is, adding events to tdname for XXX)
$ ("Td[name= ' Strgoodssku ')". each (function(index,item) {varOldtest = $ ( This). text ();
If the text in TD is longer than 30 characters, the following characters are replaced with ... if($( This). Text (). length>30){ varNewText = $ ( This). Text (). SUBSTRING (0,30); $( This). Text (newtext+ "..."); }//Start adding mouse over events, passing two function,function1 for the slide-in event, function2 for slide-out event $ ( This). Hover (function() {//Adds a Div, sets the style to the Div, and displays the $ (document.body) next to the mouse. Append ($ (' <div id= ' follower "style=" width:500px;height:80px;border:1px solid #000 background: #e1e1e1;p osition:absolute " ></div> '). MouseMove (function(e) {$ ("#follower"). Text (oldtest). css ({top:e.pagey+10,left:e.pagex+10}) }) },function(){
Remove Display div $ ("#follower"). Remove (); }); /*$ (this). MouseLeave (function () {});*/ });
Slide the mouse to a location, the details pop-up next to the mouse popup div