Highlighted

HTML window.alert hide in other breakpoints

Explorer ,
Oct 22, 2017

Copy link to clipboard

Copied

Hi,

Im trying to make a pop up window.alert appear only in my mobile breakpoints, however even when I hide in other breakpoints - the pop up alert appears in all of them when published. Any ideas how to hide html window.alert pop ups in other break points so that the code is only fired within specific breakpoints?

code used:

<script>

window.alert("message here...");

</script>

In my knowledge, I do not think <script> can be used in conditional way or based on breakpoint unless you are using adaptive/alternate layout.

Toufic Nabi

Views

141

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

HTML window.alert hide in other breakpoints

Explorer ,
Oct 22, 2017

Copy link to clipboard

Copied

Hi,

Im trying to make a pop up window.alert appear only in my mobile breakpoints, however even when I hide in other breakpoints - the pop up alert appears in all of them when published. Any ideas how to hide html window.alert pop ups in other break points so that the code is only fired within specific breakpoints?

code used:

<script>

window.alert("message here...");

</script>

In my knowledge, I do not think <script> can be used in conditional way or based on breakpoint unless you are using adaptive/alternate layout.

Toufic Nabi

Views

142

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Oct 22, 2017 0
Contributor ,
Oct 22, 2017

Copy link to clipboard

Copied

In my knowledge, I do not think <script> can be used in conditional way or based on breakpoint unless you are using adaptive/alternate layout.

Toufic Nabi

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 22, 2017 1
Most Valuable Participant ,
Oct 22, 2017

Copy link to clipboard

Copied

you can make an alt phone layout... then run your script in that

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 22, 2017 1