VideoHive

Posts by Yaeko

708 posts
  • Belgium
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 100 and 1 000 dollars
Yaeko says

Phpstorm

708 posts
  • Belgium
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 100 and 1 000 dollars
Yaeko says

Found it:

$(items).each(function(){ itemWidth += $(this).width(); });
708 posts
  • Belgium
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 100 and 1 000 dollars
Yaeko says

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!

708 posts
  • Belgium
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 100 and 1 000 dollars
Yaeko says

Prometheus :)

708 posts
  • Belgium
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 100 and 1 000 dollars
Yaeko says

nice job!

708 posts
  • Belgium
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 100 and 1 000 dollars
Yaeko says

check the checkbox and inspect the element, you’ll see that the attribute “checked” isn’t there but the checkbox is checked.

708 posts
  • Belgium
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 100 and 1 000 dollars
Yaeko says

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 .

708 posts
  • Belgium
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 100 and 1 000 dollars
Yaeko says

yeah sure: jsfiddle

708 posts
  • Belgium
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 100 and 1 000 dollars
Yaeko says

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!

708 posts
  • Belgium
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 100 and 1 000 dollars
Yaeko says

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.

by
by
by
by
by