es6:Destructoring

In this example below you will see how to do a es6:Destructoring with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by 兰悦儿格格, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright 兰悦儿格格 ©

Technologies

  • HTML
  • JavaScript
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>es6:Destructoring</title>
  
  
  
  
  
</head>

<body>

  <ul id="ulCityTab">
  <li><a aria-controls="4304">我说</a></li>
   <li><a aria-controls="4305">我说</a></li>
   <li><a aria-controls="4306">我说</a></li>
</ul>
  <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js'></script>

  

    <script  src="js/index.js"></script>




</body>

</html>

/*Downloaded from https://www.codeseek.co/wuxiaolan91/es6destructoring-vjVYmz */
debugger;
var $controls = $("#ulCityTab a[aria-controls]");
$controls.each(function() {
  var value = $(this).attr('aria-controls');
  alert(value);
});

Comments