javascript - Select a div within a while of divs -


How to choose a div between div set is the same class? These divs are taken from a database and have been shown using a mysql_fetch_array. Cause I want to use / edit the information contained in each of these divs.

Any kind of work is welcome: jquery, javascript, ..

Regards!

You can use the jQuery selector and / or function (and their derivatives : First / first () , : last / .last () , ...) To select from the div s index, if you are asking.

Example:

  var thirdFooDiv = $ ("div.foo:eq (2)"); // third, first 0 is    

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -