Ask for a simple display question

Source: Internet
Author: User
Now there are a series of
  • Labels, each
  • There is a label inside the tag, start these a tag is hidden state, want to implement when the mouse on a certain Li above is, the inside of the a tag is shown to solve!!!


    Reply to discussion (solution)

    $ (this). Next (). Show ()

    What about the structure? How is it hidden? Dispaly:none? Or the other?

    You can do it with CSS.

     
       Insert Title here
     
       
       
    • A
    • B
    • C
    • D
    • E

    Easy with jquery.

  • Litest1
  • Litest2
  • Litest3
  • Li's hover, but there will be some problems under IE6.
    There's a patch in the direction

    Reply Ww_super:
    That's how I wrote it:

    $ (' #msglist Li '). MouseOver (function () {$ (this). Children ("a"). CSS ("Display", "block");}); $ (' #msglist Li '). Mouseout (function () {$ (this). Children (' a '). CSS ("display", "none");});

    But when the mouse leaves, a does not show up to solve

    Li's hover, but there will be some problems under IE6.
    There's a patch in the direction

    Although I do not do the front desk, but IE6--~

    This is the JS code

    $ (' #msglist Li '). MouseOver (function () {$ (this). Children ("a"). CSS ("Display", "block");}); $ (' #msglist Li '). Mouseout (function () {$ (this). Children (' a '). CSS ("display", "none");});

    This is the HTML code
     
       
       
    • X

      {$vo 2. ToName}

      {$vo 2. Addtime}

      {$vo 2. MSG}


    Why not achieve the effect?



    Did you load jquery?

    Like the example I gave you, put your JS code in
    $ (document). Ready (function () {...}) Come inside!

    This is to let you run the page and then execute JS, you start to execute JS, the page has not yet written those elements, the complete code is as follows

     
       
       
    • X

      {$vo 2. ToName}

      {$vo 2. Addtime}

      {$vo 2. MSG}

    Don't understand....


  • 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.