id iteration through Numbered div's

id iteration through Numbered div's

Hi All...

So this is one of the code provided by api of jquery
 This is the code

Example: Finds the element with the id "myID.entry[1]". See how certain characters must be escaped with backslashes.

<!DOCTYPE html>
<html>
<head>
 
<style>
  div
{
    width
: 300px;
   
float:left;
    padding
: 2px;
    margin
: 3px;
    background
-color: #EEEEEE;
 
}
 
</style>
 
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
 
<div id="myID.entry[0]">id="myID.entry[0]"</div>

 

<div id="myID.entry[1]">id="myID.entry[1]"</div>
 
<div id="myID.entry[2]">id="myID.entry[2]"</div>
<script>$("#myID\\.entry\\[1\\]").css("border","3px solid red");</script>


</body>
</html>

    
This is the output:
id="myID.entry[0]"
id="myID.entry[1]"
id="myID.entry[2]"

My Quesztions is how can we iterate through the loop so i can apply styles to some more or each div id's..since one of the code line is  $ ( "#myID\\.entry\\[1\\]" ). css ( "border" , "3px solid red" ); which is hardcoded to show style on div id:1