如何在show / hide中使用Javascript转换

时间:2017-04-25 10:15:26

标签: javascript jquery

我在JavaScript中使用此代码来显示/隐藏div。现在我想在JavaScript中添加转换,但似乎无法让它工作。

Div Code

/home/sven/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/prometheus-client-0.6.0/lib -I /home/sven/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/quantile-0.2.0/lib
nil
Exception `ArgumentError' at /home/sven/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:86 - wrong number of arguments (given 2, expected 1)
Exception `ArgumentError' at /home/sven/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:49 - wrong number of arguments (given 2, expected 1)
Exception `ArgumentError' at /home/sven/.rbenv/versions/2.3.3/bin/rackup:22 - wrong number of arguments (given 2, expected 1)
/home/sven/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rack-1.5.5/lib/rack/deflater.rb:20:in `initialize': wrong number of arguments (given 2, expected 1) (ArgumentError)
    from /home/sven/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:86:in `new'
    from /home/sven/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:86:in `block in use'
    from /home/sven/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:134:in `block in to_app'
    from /home/sven/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:134:in `each'
    from /home/sven/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:134:in `inject'
    from /home/sven/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:134:in `to_app'
    from /home/sven/StarPerfMonitor_v2.0.0/config.ru:13:in `<main>'
    from /home/sven/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:49:in `eval'
    from /home/sven/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:49:in `new_from_string'
    from /home/sven/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:40:in `parse_file'
    from /home/sven/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rack-1.5.5/lib/rack/server.rb:277:in `build_app_and_options_from_config'
    from /home/sven/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rack-1.5.5/lib/rack/server.rb:199:in `app'
    from /home/sven/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rack-1.5.5/lib/rack/server.rb:314:in `wrapped_app'
    from /home/sven/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rack-1.5.5/lib/rack/server.rb:242:in `start'
    from /home/sven/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rack-1.5.5/lib/rack/server.rb:141:in `start'
    from /home/sven/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/rack-1.5.5/bin/rackup:4:in `<top (required)>'
    from /home/sven/.rbenv/versions/2.3.3/bin/rackup:22:in `load'
    from /home/sven/.rbenv/versions/2.3.3/bin/rackup:22:in `<main>'

JavaScript代码

<div class="checkout_other"> <a class="jmbag" href="javascript:void(0);" onclick="showCheckoutOther(this);"><span>+</span>Order Message</a>
    <div class="subbox_other">
        <div class="p-message-title">Leave a message for Admin:</div>
        <textarea name="postscript" cols="100" rows="2" id="postscript" class="message-text ui-textfield ui-textfield-system multiple no-hit" placeholder="Mention If Any Special Request / Instructions About Your Order">{$order.postscript|escape}</textarea>
        <p class="message-text-tip">Max. 1,000 English characters or numerals only. No HTML codes.</p>
    </div>
</div>

是否可以制作一些动画,例如fadout,easyout而不是仅显示它?

0 个答案:

没有答案