How do I combine the two conditions?

  • 0
    Как объединить два условия? без доп селектора или дата атрибутов
     $('a[href^="#"]') или  $('a[href^="/#"]').click(function() { код})
    JavaScript Anonymous, May 3, 2019

  • 1 Answers
  • 0
    https://api.jquery.com/multiple-selector/



    $ ('a [href ^ = "#"], a [href ^ = "/ #"]'). click (...);
    Anonymous

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!