Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <title>JS Bin</title>
  </head>
  <body>
    <div class="box strongBorder"></div>
    
 
    <div>
      <button id='readBorderProperties'>Read Border CSS Properties</button>       
    </div>
  
 
    <script src="https://code.jquery.com/jquery-3.1.0.js"></script>
  </body>
</html>
 
.box {
  width: 100px;
  height: 100px;
  border: 1px solid black;
  background-color: blue;
}
.strongBorder {
  border: 5px red solid;
}
button {
  margin-top: 10px;
}
 
$(() => {
  
  $("#readBorderProperties").click(() => {
   // read "border" css properties of box
   const borderProperties = $(".box").css("border")
   alert(borderProperties)
  })
})
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x