tags:

views:

52

answers:

5

The code is as follows:

<div id="compv-navbar">
        <a href="#"><img src="image1.png" id="icon1"></a> | 
        <a href="#"><img src="image2.png" id="icon2"></a> | 
        <a href="#"><img src="image3.png" id="icon3"></a> | 
        <span id="view_name"> 2-up</span>
    </div>

The jQuery is as follows:

$("#icon2")
            .qtip ({
                   content: 'Placeholder Text.',
                   show: 'mouseover',
                   hide: 'mouseout'
                  })

The above works, however, I want to select both 'icon2 & icon3'.

I tried doing $('#icon2 #icon3') and that didn't work.

+1  A: 

try

$('#icon2 , #icon3')

with comma separated

look :

http://api.jquery.com/multiple-selector/

Haim Evgi
Brilliant!Worked.
marcamillion
+1  A: 

try $('#icon2, #icon3')

, can be used for combining selectors

http://api.jquery.com/multiple-selector/

LightX
+1  A: 

You can try using -

$('#icon2, #icon3')

or

$('#icon2').add('#icon3')
Dev
+1  A: 

You need to comma sepperate multiple elements:

$('#icon2, #icon3')

as good as

$('#icon2').add('#icon3')

as good as

$('#compv-navbar').find('img:gt(0)')
jAndy
+2  A: 

Just to add, you can use the :gt selector as follows:

// select all images after the first one
$("#compv-navbar img:gt(0)")
karim79
thats awesome!!
Mithun P
This is awesome actually.
marcamillion