Use jQuery selector as method-Collection of common programming errors

I have page with many inputs inside a set of different divs.

A subset of those inputs are created dinamically and they can be also deleted.

By creating and deleting elements i could have a list of inputs named as shown:


    
     
     
    

    
     
     
     


    
     
     
    

    
     
     
     

    ....

I need to select all elements with a name that ends with [price] and save in a different variable of each div.

I tried a jQuery selector used as method of getelementbyid:

first_price_inputs = document.getElementById('first').jQuery('input[name$="[price]"]')
second_price_inputs = document.getElementById('second').jQuery('input[name$="[price]"]')

But i get this error:

Uncaught TypeError: Object # has no method 'jQuery'

please help!

Originally posted 2013-11-13 09:49:32.