How to remove li and ol with two class names using jQuery

This question already has an answer here:

  • How can I select an element with multiple classes in jQuery? 10 answers

  • You can stick two class together without space:

    $('ul.bjqs-controls.v-centered').empty();
    $('ol.bjqs-markers.h-centered').empty();
    

    Updated Fiddle


    Just use two class qualifiers:

    $('ul.bjqs-controls.v-centered').empty();
    

    There should not be a space between them. You can do all this with just one call:

    $('ul.bjqs-controls.v-centered, ul.bjqs-controls.h-centered').empty();
    

    http://jsfiddle.net/mohammadAdil/D5ss8/459/

    $('input').click(function() {
       $('ul.bjqs-controls.v-centered').empty();
       $('ol.bjqs-markers.h-centered').empty();
    });
    
    链接地址: http://www.djcxy.com/p/83094.html

    上一篇: 我需要帮助访问一个div内的按钮

    下一篇: 如何使用jQuery删除两个类名的li和ol