Not Sure if this can be done, the way I am approaching it. Here goes nothing. I am echoing images from a php upload script, each img has a unique ID which starts at A1,A2,A3,A4 and so on. Now I can select That img ID and create the action I want, however I have to do it for every ID, I wont be able to do this as new ones are created, How would I tell jQuery to do the same thing to A1 (A2,A3) Some sort of Increment.
JS
$(document).ready(function(){
$("#1 ").hover(
function(){
$("#A1").slideDown();
},
function(){
$("#A1").slideUp();
});
});
$(document).ready(function(){
$("#2 ").hover(
function(){
$("#A2").slideDown();
},
function(){
$("#A2").slideUp();
});
});
PHP
$i= 0; while(($file = $myDir->read()) !==false){
if(!is_dir($file)){
$i++;
//echo "Filename: $file<br/>";
echo "<div id='images'>";
echo "<p>";
echo "<a id='$i'href=\"display/$file\"><img src=\"thumbs/$file\" /> </a>\n";
echo "</p>";
echo"</div>";
echo "<div id='imageHolder' >";
echo "<img id='A$i' style='display:none' src=\"display/$file\" />";
echo"</div>";
}
}