You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<divx-data="{ // bodyWidth: 0, // Dont will change (is static value) init() { // $store.bodyWidth = $store.windowWidth; // Dynamic way 1 // this.bodyWidth = $store.windowWidth; }, get bodyWidth() { return $store.windowWidth; // Dynamic way 2 }, get screenType() { if ($store.windowWidth <= 700) { return 'mobile'; } if ($store.windowWidth <= 1024) { return 'medium'; } if ($store.windowWidth <= 2048) { return 'large'; } if ($store.windowWidth > 2048) { return 'extra large'; } return ''; }}"><p>The width of the element is: <spanx-text="bodyWidth"></span> pixels</p><p>Showing for:
<spanx-show="$store.windowWidth <= 1024">mobile</span><spanx-show="$store.windowWidth > 1024">desktop</span></p><p>$store.screenType: <spanx-text="$store.screenType"></span></p><p>$store.windowWidth: <spanx-text="$store.windowWidth"></span> pixels</p><p>$store.windowHeight: <spanx-text="$store.windowHeight"></span> pixels</p><p>$store.screenInfo.width: <spanx-text="$store.screenInfo.width"></span> pixels</p><p>$store.screenInfo.height: <spanx-text="$store.screenInfo.height"></span> pixels</p><px-show="$store.screenType === 'mobile'">This will show only in mobile screen</p><px-show="['mobile', 'medium'].includes($store.screenType)">This will show only in mobile and medium screen</p></div>