Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery multiple ids same function

 $('body').on('click', '#element1, #element2, #element3', function () {
 console.log('Hello Developers');
 })
 
 //HTML
 
<button id="element1">Element1</button>
<button id="element2">Element2</button>
<button id="element3">Element3</button>
 
PREVIOUS NEXT
Tagged: #jquery #multiple #ids #function
ADD COMMENT
Topic
Name
2+1 =