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 don't know what I'm supposed to be doing. I'm more confused now.
  2. H

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

    '0', '3', '5', '7' The numbers need to go into the value? ['0', '3', '5', '7' ].forEach(function callback(value, index) { players.add(".playSingle" + index, (playerVarsList[index] || {})); }); value needs to be added to players somehow?
  3. H

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

    These? https://jsfiddle.net/eadk7vpr/1/ let playerVarsList = { "0": { playerVars: { playlist: "0dgNc5S8cLI,mnfmQe8Mv1g,-Xgi_way56U,CHahce95B1g" } }, "3": { videoId: "0dgNc5S8cLI" }, "5": { playerVars: { list...
  4. H

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

    To here? value? I'm confused. players.add(".playSingle" + index, (playerVarsList[index] || {}));
  5. H

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

    I tried doing this: https://jsfiddle.net/kqtpn0wd/3/ It did not work. Was I supposed to do something else instead? ['0', '3', '5', '7' ].forEach(function callback(index) { players.add(".playSingle" + index, (playerVarsList[index] || {})); });
  6. H

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

    It applies a specific set of player vars to a specific .playSingle element. The specific ones are determined by the index so I assume playersAdd is in a loop which loops through all the .playSingles.
  7. H

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

    The first is to get the numerical value, the 2nd is to get all the players?
  8. H

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

    What do I do after this? This would be havening it changed to numerical? totalP.forEach(function(element, index) { players.add(".playSingle" + index, (playerVarsList[index] || {})); });
  9. H

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

    Yes, if that is the right recourse from here that will have this issue resolved, then changed to numerical would be correct.
  10. H

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

    Lots of stuff comes up but I don't know what it all means. https://jsfiddle.net/c63w71fz/2/ totalP.forEach(function(index) { console.log(index); players.add(".playSingle" + index, (playerVarsList[index] || {})); }); [object HTMLButtonElement] { accessKey: "", addEventListener...
  11. H

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

    I am not sure if I am doing this right. https://jsfiddle.net/La7py1u9/1/ totalP.forEach(function(index) { console.log([index]); players.add(".playSingle" + index, (playerVarsList[index] || {})); });
  12. H

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

    I receive an error then: https://codeforum.org/threads/how-to-add-data-id-to-button-allowing-me-to-remove-the-2nd-container.5737/post-21212
  13. H

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

    Doing this: https://jsfiddle.net/aohcqLvu/ totalP.forEach(function (index) { players.add(".playSingle" + index, (playerVarsList[index] || {})); }); I receive this error:
  14. H

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

    I had thought you were telling me to do that in the code, now I am confused.
  15. H

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

    The idea here would be to somehow remove someArr, from the code? Without errors appearing in the code. Did I fix any of those errors in here? https://jsfiddle.net/ystz8cx0/ totalP.forEach(function (someArr,index) { console.log(someArr[index]); players.add(".playSingle" + index...
  16. H

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

    Is that error still occurring here? https://jsfiddle.net/ystz8cx0/ This error?
Back
Top Bottom