Skip to content Skip to sidebar Skip to footer

Jquery Toggle (show/hide) Based On Selector

I want to create animation based on jquery, below is my code; >items=document.querySelectorAll('#customers td span'); [

Solution 1:

Below is my final code;

<script>
$(document).ready(function ($) {
    window.setInterval(function(){
        $("#customers, td, span").each(function(){
            if($(this).children("span").attr("alt")!=null){
                var dt=new Date($(this).children("span").attr("alt").split(",")[3].replace(/-/g,"/")).getTime();
                if(dt>$.now()-20*1000){
                    console.log("animating");
                    $(this).parent().fadeOut(500,"linear");
                    $(this).parent().fadeIn(500,"linear");
                }
            }
        });
    },1100);
});
</script>

Post a Comment for "Jquery Toggle (show/hide) Based On Selector"