Slide the mouse to a location, the details pop-up next to the mouse popup div

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.