Akordeon and theater dd



  • Decided to make accordeon and based on the bottom menu:

        <script type="text/javascript">
    $(function(){
    $('#accordion dl#naz dd').hide();
    $('#accordion dl#naz').hover(
        function(){
        $(this).find('dt').slideDown();
        },function(){
        $(this).find('dt').slideUp('fast');
        });
        });
    

    </script>
    <div id="accordion">
    <dl>
    <dt>Один</dt>
    <dd>12345</dd>
    <dt>Два</dt>
    <dd>qwerrrtt</dd>
    </dl>
    </div>

    But nothing works. Maybe it's because it doesn't work with. dd And they do? How do we solve this problem?



  • I was doing this:

    <!DOCTYPE html>
    <html>
    <head>
    <title></title>
    <script src="http://code.jquery.com/jquery-1.6.3.min.js"></script>
    <script type="text/javascript">
    $(function(){
    $('dd').hide();
    $('dt').hover(
        function(){
            $(this).next('dd').slideDown(300);
        },
        function(){
            $(this).next('dd').slideUp(1200);
        });
    });
    

    </script>
    </head>
    <body>
    <div id="accordion">
    <dl id="naz">
    <dt>Один</dt>
    <dd>12345</dd>
    <dt>Два</dt>
    <dd>qwerrrtt</dd>
    </dl>
    </div>
    </body>
    </html>

    Of course it is. We need to get an element clearly so the effect can be well observed. To this end, the dimensions of the element need to be more detailed in order to form a field of guidance, for example. Elements appearing must not break the line. But still, you're going to be crazy. We need to work on this. css- of the elements. The lists of definitions are not entirely appropriate for these purposes (they have a special default mark). I also believe that the function hover For the accordon, a little overkill, of course, but still... There's a different element in the introduction, and the element that the initial introduction was made can be crawled out of the cadet and the function of concealment begins. So, in my view, to make the scordecones on the cheek-- you pressed a certain paragraph and wait for a new element to emerge.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2