Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: What am I doing wrong here? #16024
    Will
    Participant

    If the gallery-icon already contains the image, you’re wiping it out by setting innerHTML to something new. You should try creating a document fragment and appending all of your new HTML, and then using appendChild on the gallery-icon item

    in reply to: What am I doing wrong here? #16010
    Will
    Participant

    What are you trying to accomplish? That will determine how someone responds to your question. A couple things though:

    getElementsByClassName only needs a class name, not a selector (i.e. ‘gallery-icon’ not ‘.gallery-icon’, note the dot)

    getElementsByClassName returns an array, so either you need to select an item from that array (e.g. content = getElementsByClassName('gallery-icon')[0] and then set that innerHTML, or loop through each item and set the innerHTML for each pass, but it depends on what you’re trying to do

    Also, all your innerHTML += lines should end in a semicolon, not a period

    in reply to: Feedback on Lesson Length #15847
    Will
    Participant

    Hey Chris – for Vimeo players (like on Know The Code) this Chrome extension works really well for adjusting playback speed

Viewing 3 posts - 1 through 3 (of 3 total)