$("a[href^='http://']") $("a[href$='.com']") $("a[href*='html']") $('p').eq(0) = document.getElementByTagName('p') $(button).on('click', func); // навешивает событие func(){};