<div id=“theone-aaa”>
<div id=“theone-bbb”>
<div id=“theone-ccc”>
var this = $(‘#theone-???’);
How can I get all div id's with the prefix "#theone-" but a different suffix to change the variable within a loop. So if a id was "theone-aaa" the variable became the same.
why the fuck wouldn't you just give them all a class? that's the whole point of classes.
Use a fucking class
How would you do this if they were class' then?
there page id's and thats why not a class
>>52410835
please go do a basic html and javascript tutorial somewhere else.
>>52410703[].forEach.call(document.querySelectorAll("[id^='theone-']"), function(variable_within_a_loop) {
do { console.log("OP IS A FAGGOT") } while(1);
});
>>52410949
will do
>>52410703
What the fuck.document.querySelector('[id^=theone-]')
then you iterate the result and do whatever the fuck you're trying to do. I can't understand your half-assed question about "the variable", use a regexp to strip the prefix from the id in the loop.
Learn how to ask a fucking question.
>>52410703
for assholes like you, people hates javascript, this is not a fucking JAVASCRIPT question, its a jquery question fucking retard.
>>52410703
>jqueery
>>52411062
You're as bad as the OP, just like him, you don't know that this doesn't require jquery at all.
>>52410989
I like this guy.
He's got like the worst possible solution, showed up after all the people saying "use a class," and gets super angry about it anyway.
Sir, you truly have found the perfect site to be posting on. Welcome home.
>>52410703
Needs more jquery
>>52411148
You would be best served by using a class, my profoundly ignorant and likely learning-disabled comrade.
>>52411111
listen to the quints!