Using $(".div-with-class")[my-variable]
Hi,
I've got a gallery and want to blend in / out the elements specified by a link parsing the element-position to a function.
- function showImageByPosition(position) {
- $(".div-with-class")[position].show();
- }
As long as "position" is written hard coded as a number, it works. As soon as I want to use the parsed variable, it stucks. Has anyone an idea?
Cheers, Mario