Hide and show function not working in Safari

后端 未结 2 1808
你的背包
你的背包 2020-12-22 10:30

This function should stop displaying the #bt_pagamento and start showing the #bt_loading. But Safari (version 6) is the only brows

相关标签:
2条回答
  • 2020-12-22 11:00
    <script>
    jQuery.noConflict()(document).ready(function() {
        $('#hide_value_discount_1').css('disabled','none');
        $('#bt_loading').click()(function(){
    
            if(document.getElementById('bt_pagamento').click()){
                $('#bt_loading').show('slow');  
    
            }else
                if(document.getElementById('bt_pagamento').click() == false){
                 $('#bt_loading').css('display','none');    
    
                }
    
        });
        $('#bt_pagamento').click();
    });
    </script>
    
    
    <a href="#" id="bt_pagamento">link</a>
    <div id="bt_loading" class="hide">
        this is bt_loading
    </div>
    
    0 讨论(0)
  • 2020-12-22 11:06

    CSS

    <style>
    .hide { display: none; }
    </style>
    

    HTML

    <a href="#" id="bt_pagamento">link</a>
    <div id="bt_loading" class="hide">
        this is bt_loading
    </div>
    

    JS

    $(document).ready(function() {
        $("#bt_pagamento").click(function (e) {
            e.preventDefault();
            $(this).addClass('hide');
            $("#bt_loading").removeClass('hide');
        });
    });
    
    0 讨论(0)
提交回复
热议问题