Thursday, October 24, 2019

D8 Jquery

  • how to class display none if anchore  href is empty... 
   jQuery('.team_icon>li>a[href=""]').css("display", "none");
   jQuery('.team-mail>li>a[href="tel:8888"]:empty').css("display", "none");

  • How to ul display none if li is empty ...
    jQuery('.icon-team>li:empty').parents('ul').css('display','none');

  • How to page scroll animation effects..
       AOS.init({
             easing: 'ease-out-back',
             duration: 800,
             delay: 300,
             once: false //animation one time or continue
            //disable: 'mobile'
      });

  • How to select item dropdown dfault text change in drupal 8

     jQuery('#edit-field-d-target-id option[value=All]').text(' Document Type ');
    jQuery('#edit-field-school-target-id option[value=All]').text('All Schools ');


  • How to remove p tage is empty $nbsp
            jQuery('p').each(function(){
              if( jQuery(this).html() == ' ' )
                  jQuery(this).remove();
           }) 



No comments:

Post a Comment

If you have any problem please let me know.