95
rated 0 times
[
97]
[
2]
/ answers: 1 / hits: 9591
/ 10 Years ago, tue, august 5, 2014, 12:00:00
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!
More From » jquery