Computer Magic Logo
Multiple tags selector

Thursday, January 12, 2017

Published by Aristotelis Pitaridis

We can select multiple tags using the “,” character. The following example demonstrates how to select all paragraphs, anchors, and span elements.

var elements = $('p, a, span');