Item
Item
Item
Item
Item
Item
Item
Item
Item
Item
{"ScriptPreparationCode":null,"TestCases":[{"Name":"jQuery Repeated selectors","Code":"$(\u0027.list\u0027).attr(\u0027aria-expanded\u0027, \u0027true\u0027);\r\n$(\u0027.list\u0027).attr(\u0027aria-expanded\u0027, \u0027false\u0027);\r\n$(\u0027.list\u0027).attr(\u0027aria-expanded\u0027, \u0027\u0027);\r\n$(\u0027.item\u0027).attr(\u0027aria-expanded\u0027, \u0027true\u0027);\r\n$(\u0027.item\u0027).attr(\u0027aria-expanded\u0027, \u0027false\u0027);\r\n$(\u0027.item\u0027).attr(\u0027aria-expanded\u0027, \u0027\u0027);\r\n$(\u0027.list\u0027).attr(\u0027aria-expanded\u0027, \u0027true\u0027);\r\n$(\u0027.list\u0027).attr(\u0027aria-expanded\u0027, \u0027false\u0027);\r\n$(\u0027.list\u0027).attr(\u0027aria-expanded\u0027, \u0027\u0027);\r\n$(\u0027.item\u0027).attr(\u0027aria-expanded\u0027, \u0027true\u0027);\r\n$(\u0027.item\u0027).attr(\u0027aria-expanded\u0027, \u0027false\u0027);\r\n$(\u0027.item\u0027).attr(\u0027aria-expanded\u0027, \u0027\u0027);\r\n$(\u0027.item\u0027).each(function() {\r\n console.log($(this));\r\n})","IsDeferred":false},{"Name":"Vanilla JS Variable Selectors with variables","Code":"var list = document.querySelectorAll(\u0027.list\u0027);\r\nvar item = document.querySelectorAll(\u0027.item\u0027);\r\n\r\nlist.forEach(function(element) {\r\n\telement.setAttribute(\u0027aria-expanded\u0027, \u0027true\u0027);\r\n})\r\nlist.forEach(function(element) {\r\n\telement.setAttribute(\u0027aria-expanded\u0027, \u0027false\u0027);\r\n})\r\nlist.forEach(function(element) {\r\n\telement.setAttribute(\u0027aria-expanded\u0027, \u0027\u0027);\r\n})\r\nitem.forEach(function(element) {\r\n\telement.setAttribute(\u0027aria-expanded\u0027, \u0027true\u0027);\r\n})\r\nitem.forEach(function(element) {\r\n\telement.setAttribute(\u0027aria-expanded\u0027, \u0027false\u0027);\r\n})\r\nitem.forEach(function(element) {\r\n\telement.setAttribute(\u0027aria-expanded\u0027, \u0027\u0027);\r\n})\r\nlist.forEach(function(element) {\r\n\telement.setAttribute(\u0027aria-expanded\u0027, \u0027true\u0027);\r\n})\r\nlist.forEach(function(element) {\r\n\telement.setAttribute(\u0027aria-expanded\u0027, \u0027false\u0027);\r\n})\r\nlist.forEach(function(element) {\r\n\telement.setAttribute(\u0027aria-expanded\u0027, \u0027\u0027);\r\n})\r\nitem.forEach(function(element) {\r\n\telement.setAttribute(\u0027aria-expanded\u0027, \u0027true\u0027);\r\n})\r\nitem.forEach(function(element) {\r\n\telement.setAttribute(\u0027aria-expanded\u0027, \u0027false\u0027);\r\n})\r\nitem.forEach(function(element) {\r\n\telement.setAttribute(\u0027aria-expanded\u0027, \u0027\u0027);\r\n})\r\nitem.forEach(function(element) {\r\n console.log(element);\r\n})","IsDeferred":false},{"Name":"jQuery Repeated Selectors \u002B Find","Code":"$(\u0027.list\u0027).attr(\u0027aria-expanded\u0027, \u0027true\u0027);\r\n$(\u0027.list\u0027).attr(\u0027aria-expanded\u0027, \u0027false\u0027);\r\n$(\u0027.list\u0027).attr(\u0027aria-expanded\u0027, \u0027\u0027);\r\n$(\u0027.item\u0027).attr(\u0027aria-expanded\u0027, \u0027true\u0027);\r\n$(\u0027.item\u0027).attr(\u0027aria-expanded\u0027, \u0027false\u0027);\r\n$(\u0027.item\u0027).attr(\u0027aria-expanded\u0027, \u0027\u0027);\r\n$(\u0027.list\u0027).attr(\u0027aria-expanded\u0027, \u0027true\u0027);\r\n$(\u0027.list\u0027).attr(\u0027aria-expanded\u0027, \u0027false\u0027);\r\n$(\u0027.list\u0027).attr(\u0027aria-expanded\u0027, \u0027\u0027);\r\n$(\u0027.item\u0027).attr(\u0027aria-expanded\u0027, \u0027true\u0027);\r\n$(\u0027.item\u0027).attr(\u0027aria-expanded\u0027, \u0027false\u0027);\r\n$(\u0027.item\u0027).attr(\u0027aria-expanded\u0027, \u0027\u0027);\r\n$(\u0027.item\u0027).each(function() {\r\n console.log($(this));\r\n $(this).find(\u0027.sublist\u0027);\r\n $(this).find(\u0027.subitem\u0027);\r\n})","IsDeferred":false},{"Name":"Vanilla JS Selectors with variables \u002B querySelector","Code":"var list = document.querySelectorAll(\u0027.list\u0027);\r\nvar item = document.querySelectorAll(\u0027.item\u0027);\r\n\r\nlist.forEach(function(element) {\r\n\telement.setAttribute(\u0027aria-expanded\u0027, \u0027true\u0027);\r\n})\r\nlist.forEach(function(element) {\r\n\telement.setAttribute(\u0027aria-expanded\u0027, \u0027false\u0027);\r\n})\r\nlist.forEach(function(element) {\r\n\telement.setAttribute(\u0027aria-expanded\u0027, \u0027\u0027);\r\n})\r\nitem.forEach(function(element) {\r\n\telement.setAttribute(\u0027aria-expanded\u0027, \u0027true\u0027);\r\n})\r\nitem.forEach(function(element) {\r\n\telement.setAttribute(\u0027aria-expanded\u0027, \u0027false\u0027);\r\n})\r\nitem.forEach(function(element) {\r\n\telement.setAttribute(\u0027aria-expanded\u0027, \u0027\u0027);\r\n})\r\nlist.forEach(function(element) {\r\n\telement.setAttribute(\u0027aria-expanded\u0027, \u0027true\u0027);\r\n})\r\nlist.forEach(function(element) {\r\n\telement.setAttribute(\u0027aria-expanded\u0027, \u0027false\u0027);\r\n})\r\nlist.forEach(function(element) {\r\n\telement.setAttribute(\u0027aria-expanded\u0027, \u0027\u0027);\r\n})\r\nitem.forEach(function(element) {\r\n\telement.setAttribute(\u0027aria-expanded\u0027, \u0027true\u0027);\r\n})\r\nitem.forEach(function(element) {\r\n\telement.setAttribute(\u0027aria-expanded\u0027, \u0027false\u0027);\r\n})\r\nitem.forEach(function(element) {\r\n\telement.setAttribute(\u0027aria-expanded\u0027, \u0027\u0027);\r\n})\r\nitem.forEach(function(element) {\r\n console.log(element);\r\n element.querySelector(\u0027.sublist\u0027);\r\n element.querySelector(\u0027.subitem\u0027);\r\n})","IsDeferred":false}]}