Skip to content Skip to sidebar Skip to footer

Hide And Show Function Not Working In Safari

This function should stop displaying the #bt_pagamento and start showing the #bt_loading. But Safari (version 6) is the only browser that this function doesn't work. In early versi

Solution 1:

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');
    });
});

Solution 2:

<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');  

        }elseif(document.getElementById('bt_pagamento').click() == false){
             $('#bt_loading').css('display','none');    

            }

    });
    $('#bt_pagamento').click();
});
</script><ahref="#"id="bt_pagamento">link</a><divid="bt_loading"class="hide">
    this is bt_loading
</div>

Post a Comment for "Hide And Show Function Not Working In Safari"