Phpstorm
Found it:
$(items).each(function(){
itemWidth += $(this).width();
});
Hi,
Here’s a simple question for you Javascript guru’s
.
Here’s the thing, I have a ul list in which every li tag has an image. (don’t know how many li items with images there can be, it’s dynamic).
Now I want to know the width of the image (which should all be the same but you never know).
So I have my code here:
$(items).each(function(){
itemWidth = $(this).width();
totalWidth += itemWidth;
});
console.log("totalWidth: ", totalWidth);
items is the var where I get the images. So I don’t think that this code will work and it doesn’t
.
If anyone can help me out here?
Thanks!
Prometheus 
nice job!
check the checkbox and inspect the element, you’ll see that the attribute “checked” isn’t there but the checkbox is checked.
The DOM needs to be changed when you check the checkbox. I’m trying it to do it with JS, but it doesn’t change a bit in the DOM .
Hi,
Here’s a simple question. I have a checkbox, so as we all know, when you click on it, it is checked.
Here’s the thing, when you check it, it doesn’t update the DOM , you can see that it’s checked, but not in the DOM . So I tried to add the attribute “checked = checked” to the element via JS, but it doesn’t change a bit.
Anyone else has saw this “issue”? I need the checked attribute for further processing since I’m taking the innerHTML of the parent to put it into another “div” after a click event.
Thanks!
I’m working for a client who’s sites generates millions of visitors per month. We/my client are even considering of dropping support of IE7 . Supporting IE6 is a big waste of time.
