Failing to understand why the code isn't working ...
the code worked fine before i added the for
condition.
Can anybody see where i went wrong by any chance ?
$(document).ready(function() {
for(i = 1, i < 2, i++) {
$("#info_abonnement" + i).hover(function() {
var pos = $(this).position();
var width = $(this).outerWidth();
$("#info_abonnements" + i).css({
position: "absolute",
top: pos.top + "px",
left: (pos.left + width) + "px"
}).show();
}, function() {
$("#info_abonnements" + i).hide()
});
}
});