Setting color for status
-
On the page using the property_overview shortcode, my client wants the status to show a certain color depending on which status it is. E.g. They want Active status to show in green.
I’ve tried javascript that I’ve tested in plain HTML pages to make sure it works, but it isn’t working here. This is my script code –
<script src="https://code.jquery.com/jquery-1.9.1.js"></script> <script type="text/javascript"> $(document).ready(function(){ $(".prop-status:contains('Active')").css('color','green'); }); </script>
And the code where the status shows –
<div class="property-data"> <span class="prop-price" style="float:left;"><?php echo do_shortcode("[property_attribute attribute=price]"); ?></span> <span class="prop-status" style="float:right;"><?php echo do_shortcode("[property_attribute attribute=status]"); ?></span> </div>
I’ve placed these exacts snippets into a plain HTML doc, and the script works fine. Is it not working because the status is being loaded through a shortcode? I also tried loading it this way, with no luck –
<?php echo $property['status']; ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Setting color for status’ is closed to new replies.