HTML window.alert hide in other breakpoints

Explorer ,
Oct 22, 2017 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>

Views

175

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
community guidelines

correct answers 1 Correct Answer

Contributor , Oct 22, 2017 Oct 22, 2017
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
Contributor ,
Oct 22, 2017 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
community guidelines
LEGEND ,
Oct 22, 2017 Oct 22, 2017

Copy link to clipboard

Copied

LATEST

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
community guidelines