I have some JavaScript code that loops through a record set using a for loop. The ID of each record is assigned dynamically using this script. For example:
id="header1", id="header2", id="header3"
The numeral at the end of the id is assigned via script.
I also need to select these IDs via jQuery but I do not understand how to insert a variable into my jQuery selector.
I have tried the following (simplified for clarity):
Well you could be more clear and more factual. When did SpaceX crash 7 rockets during their hop tests? If you're referring to the Starship test flights, then I'm not sure why you think an orbital rocket should be compared to a simple hop test. What is similar between those?
If you're going to make weird and irrelevant comparisons, you should expect to be called out on it.
To answer the question, no. I do not like what Microsoft did to the Start menu in Windows 11. As far as layouts go I prefer even the classic Start menu over that one.
4. Go back to the Windows 10-style Start menu - Nope (3.4K+ upvotes)
The Windows 10 Start Menu is easily my favorite. I loved the tiles on my main desktop and I liked the ability to shrink the window, hiding the tiles on my media server so it was just the All Applications list
9. Bring back live tiles - Nope (1K+ upvotes)
Carrying on from point 4. I loved the tiles but hated that they were animated. It would be awesome if they'd bring back the tile groups and various tile sizes and just let users change the icons as desired. I hate the current start menu and app grouping. I don't want my Windows PC to feel like my Android phone.
Question
raskren
I have some JavaScript code that loops through a record set using a for loop. The ID of each record is assigned dynamically using this script. For example:
The numeral at the end of the id is assigned via script.
I also need to select these IDs via jQuery but I do not understand how to insert a variable into my jQuery selector.
I have tried the following (simplified for clarity):
None of these things seem to work as jQuery doesn't select the objects I'm trying to get.
Any ideas on how to dynamically create jQuery objects using a counter variable?
Link to comment
https://www.neowin.net/forum/topic/696738-passing-a-variable-to-a-jquery-selector/Share on other sites
10 answers to this question
Recommended Posts