I have an jQuery object with 3 members:
var elements = $("#" + this.wrapperName + ">ul>li>a>img");
Object { 0: <img>, 1: <img>, 2: <img>, length: 3, prevObject: Object, context: HTMLDocument → JSUmstellung, selector: "#newsdesk>ul>li>a>img" }
I want to change eachs CSS-Property, so I made this:
elements.each(function(index, element) {
element.css({
"width": elemWidth,
"height": elemHeight,
"top": elemTop,
"left": elemLeft
});
}
When I run this code, I just get the following error:
TypeError: element.css is not a function
What am I doing wrong? Do I have to access my element in another way?
Thanks in advance!
indexorelement, you don't have to include them:elements.each(function() {. Then use$(this)in the function.