I am trying to make a 'notify me' link to fire a modal contact form if the product is out of stock. This is OK except that if the 'enable stock monitoring box' is unticked in Product Details the notify me text and icon appear regardless.
I am trying to add a clas to #notifyme to hide it if 'EnableIfOutOfStock_<actinic:variable name="ProductReference" selectable="false" />' is 'visibility: hidden' but although the script should work it does not work in Sellerdeck!
Please can anyone point me in the right direction?
Thank you
I am trying to add a clas to #notifyme to hide it if 'EnableIfOutOfStock_<actinic:variable name="ProductReference" selectable="false" />' is 'visibility: hidden' but although the script should work it does not work in Sellerdeck!
Please can anyone point me in the right direction?
Thank you
Code:
<strong><span class="actrequired"><span id="EnableIfOutOfStock_<actinic:variable name="ProductReference" selectable="false" />" class="ActinicRTS" style="visibility: hidden; display: none;" data-message="<Actinic:Variable Name="OutOfStock"/>"></span></span></strong> <actinic:block if="%3cactinic%3avariable%20name%3d%22StockLevel%22%20%2f%3e%20%3c%3d%20%3cactinic%3avariable%20name%3d%22StockSuspendLevel%22%20%2f%3e" > <script> $(document).ready(function(){ if ($("#EnableIfOutOfStock_<actinic:variable name='ProductReference' selectable='false' />").attr("visibility") === "hidden") { $("#notify-icon").addClass("hideme"); } else {} }); </script> <div id="notify-icon" class="" data-toggle="modal" data-target="#notify-content"><i class="fa fa-bullhorn" aria-hidden="true"></i> Notify me!</div> </actinic:block>
Comment