I want to load the following CSS
only when window url is https://mywebsite.com/my-account/return
CSS:
<style>.shop table.shop_table.my_account_orders>tbody>tr{
display: table-row !important;}
.shop table.shop_table.my_account_orders>tbody>tr>td{
display: table-cell !important;}
.shop table.shop_table.my_account_orders>tbody>tr>td:before{
display: table-row !important;}</style>
if you want to load the style, try this with jquery
<html>
<head>
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script>
$(document).ready(function(){
var pageURL = $(location).attr("href");
console.log(pageURL);
if( pageURL == 'https://mywebsite.com/my-account/return') {
$('head').append('<style>.shop table.shop_table.my_account_orders>tbody>tr{\
display: table-row !important;}\
.shop table.shop_table.my_account_orders>tbody>tr>td{\
display: table-cell !important;}\
.shop table.shop_table.my_account_orders>tbody>tr>td:before{\
display: table-row !important;}</style>');
}
});
</script>
</head>
<body>
</body>
</html>
it worked as i expected