Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Search results

  1. H

    JavaScript How to add data-id to button, allowing me to remove the 2nd container

    I thought I was going to hear something from you after I answered this question from you.
  2. H

    JavaScript How to add data-id to button, allowing me to remove the 2nd container

    You asked me a set of questions, I answered them. I was waiting to hear back from you on what to do next.
  3. H

    JavaScript How to add data-id to button, allowing me to remove the 2nd container

    Custom properties are added to specific players only. In this instance: Only these players get custom added ones: ['0', '3', '5', '7'] The array is being used to give custom properties to these players only: ['0', '3', '5', '7']
  4. H

    JavaScript How to add data-id to button, allowing me to remove the 2nd container

    The numbers from these: playSingle0 That are used in the array. ['0', '3', '5', '7'] It gets all of the numbers then separates out the ones used in the array.
  5. H

    JavaScript How to add data-id to button, allowing me to remove the 2nd container

    TotalP is looping through these: <div class="playButtonContainer with-curtain hide"> <button class="playSingle0 cover" type="button" data-container="play1" data-id="M7lc1UVf-VE"></button> <button class="playSingle1 cover" type="button" data-container="play1" data-id="M7lc1UVf-VE"></button>...
  6. H

    JavaScript How to add data-id to button, allowing me to remove the 2nd container

    I need to loop through the items in totalP to select the numbers that are in the array. Inside the array I need this information: playerVars: { end: 1800, playlist: "0dgNc5S8cLI,mnfmQe8Mv1g,-Xgi_way56U,CHahce95B1g", start: 150 }
  7. H

    JavaScript How to add data-id to button, allowing me to remove the 2nd container

    That is how the blue buttons appear on the screen.
  8. H

    JavaScript How to add data-id to button, allowing me to remove the 2nd container

    All of these buttons: <button class="playSingle0 cover" type="button" data-container="play1"></button>
  9. H

    JavaScript How to add data-id to button, allowing me to remove the 2nd container

    Way too much to screenshot. The results: Edit fiddle - JSFiddle - Code Playground [object NodeList] { 0: [object HTMLButtonElement] { accessKey: "", addEventListener: function addEventListener() { [native code] }, after: function after() { [native code] }, animate: function...
  10. H

    JavaScript How to add data-id to button, allowing me to remove the 2nd container

    What I know is that the code can't work written this way: const totalP = document.querySelectorAll("[data-container=\"play1\"]"); ['0', '3', '5', '7'].forEach(function callback(value, index) { players.add(".playSingle" + index, (playerVarsList[index] || {})); }); Because, ['0', '3'...
  11. H

    JavaScript How to add data-id to button, allowing me to remove the 2nd container

    Will the code just not work using this? ['0', '3', '5', '7'].forEach
  12. H

    JavaScript How to add data-id to button, allowing me to remove the 2nd container

    You just had me remove it so I removed it. What do I do next?
  13. H

    JavaScript How to add data-id to button, allowing me to remove the 2nd container

    I should remove this line? const totalP = document.querySelectorAll("[data-container=\"play1\"]"); ok Edit fiddle - JSFiddle - Code Playground //const totalP = document.querySelectorAll("[data-container=\"play1\"]"); ['0', '3', '5', '7'].forEach(function callback(value, index) {...
  14. H

    JavaScript How to add data-id to button, allowing me to remove the 2nd container

    I removed const totalP = from it. I was supposed to do that, right? document.querySelectorAll("[data-container=\"play1\"]"); ['0', '3', '5', '7'].forEach(function callback(value, index) { players.add(".playSingle" + index, (playerVarsList[index] || {})); });
  15. H

    JavaScript How to add data-id to button, allowing me to remove the 2nd container

    So, then this? function onYouTubeIframeAPIReady() { let playerVarsList = { "0": { playerVars: { playlist: "0dgNc5S8cLI,mnfmQe8Mv1g,-Xgi_way56U,CHahce95B1g" } }, "3": { videoId: "0dgNc5S8cLI" }, "5": { playerVars: { list...
  16. H

    JavaScript How to add data-id to button, allowing me to remove the 2nd container

    totalP is getting replaced with what? const totalP = document.querySelectorAll("[data-container=\"play1\"]"); ['0', '3', '5', '7'].forEach(function callback(value, index) { players.add(".playSingle" + index, (playerVarsList[index] || {})); });
  17. H

    JavaScript How to add data-id to button, allowing me to remove the 2nd container

    I thought you wanted me to keep the console logs in there, no?
  18. H

    JavaScript How to add data-id to button, allowing me to remove the 2nd container

    It says this: Edit fiddle - JSFiddle - Code Playground function addPlayer(coverSelector, playerOptions) { const cover = document.querySelector(coverSelector); const wrapper = manageUI.getWrapper(cover); const callback = managePlayer.adder(wrapper, playerOptions)...
Back
Top Bottom