Search results

  1. H

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

    Can you confirm for me that "_," can be deleted from the code? Meaning, the code is able to work with that not being in there? Working Code: Edit fiddle - JSFiddle - Code Playground ['0', '3', '5', '7'].forEach(function callback(_, index) { players.add(".playSingle" + index...
  2. H

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

    It looks like I am back to this: This code works: Edit fiddle - JSFiddle - Code Playground const totalP = document.querySelectorAll("[data-container=\"play1\"]"); totalP.forEach(function(_, index) { players.add(".playSingle" + index, (playerVarsList[index] || {})); }); This code works: Edit...
  3. H

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

    What, it's not working now. Edit fiddle - JSFiddle - Code Playground I thought I had the code working. ["0", "3", "5", "7"].forEach(function callback(index) { players.add(".playSingle" + index, (playerVarsList[index] || {})); }); players.add(".playInitial", {}); }
  4. H

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

    Now it works: Edit fiddle - JSFiddle - Code Playground ["0", "3", "5", "7"].forEach(function callback(index) { players.add(".playSingle" + index, (playerVarsList[index] || {})); }); players.add(".playInitial", {}); } Where this line can be removed: const totalP =...
  5. H

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

    This code works: Edit fiddle - JSFiddle - Code Playground const totalP = document.querySelectorAll("[data-container=\"play1\"]"); totalP.forEach(function(_, index) { players.add(".playSingle" + index, (playerVarsList[index] || {})); }); This code works: Edit fiddle - JSFiddle - Code...
  6. H

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

    Here is the code working: Edit fiddle - JSFiddle - Code Playground totalP.forEach(function (_,index) { players.add(".playSingle" + index, (playerVarsList[index] || {})); }); Here is the code not working: Edit fiddle - JSFiddle - Code Playground ['0', '3', '5'...
  7. H

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

    How can I attempt steps if I don't know what the steps are? I answered the last question you had for me here: https://codeforum.org/threads/how-to-add-data-id-to-button-allowing-me-to-remove-the-2nd-container.5737/page-14#post-21623 From that point, what is the next thing I am supposed to do...
  8. H

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

    I am clueless as to what the next steps are.
  9. H

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

    Without instruction on what to do next in the code, then I am lost and have no idea. Now I am lost and don't know what I am up to doing in the code. Edit fiddle - JSFiddle - Code Playground const totalP = document.querySelectorAll("[data-container=\"play1\"]"); ['0', '3', '5'...
  10. 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.
  11. 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.
  12. 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']
  13. 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.
  14. 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>...
  15. 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 }
  16. 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.
  17. 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>
  18. 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...
Top