-3

I have a code like this:

<div id="advertisement-template" style="display:none;">
</div>

and there is an element like this inside

<script type="text/javascript">
....................
....................
....................
        });
    </script>

When I use <script type="... element by itself it works but when it is inside <div id="advertisement-template" style="display:none;"> it doesn't show up. I cannot change anything above or inside <div id="advertisement-template" style="display:none;">, I can only put something between <div id="advertisement-template" style="display:none;"> and </div> to make the element show up.

I have checked this page and this one but haven't found a solution.

I don't know much about coding yet but I need a solution for this problem. Please help.

Marina
  • 1
  • 2
    Could you provide a code example of what works and what does not work? That will make it easier for others to help you. – Unsolved Cypher Nov 22 '18 at 06:42
  • I would not recommend this but if it is inevitable you could use this in style tag or in stylesheet #advertisement-template[style]{ display:block !important; } to override the inline-style. – vssadineni Nov 22 '18 at 06:54
  • I'm not sure I understand the problem. You can put a – Mr Lister Nov 22 '18 at 07:23

1 Answers1

-1

pls try below jquery

<script>
    $(document).ready(function() {
        $("#advertisement-template").removeAttr("style");
    });
</script>
AddWeb Solution Pvt Ltd
  • 21,025
  • 5
  • 26
  • 57