0 Replies Latest reply on Feb 22, 2013 6:33 PM by dustyxhope

    Dreamweaver widget load as per Screen Size

    dustyxhope

      new Dreamweaver widget for Edge puts Edge <object> into Dreamweaver via xml which then goes ahead and automatically loads animation along with all companion files. working so far like a dream. seems even to be able to load on single html multiple Edge files.

       

      I wanted to see if I could write a simple conditional statement using jquery that loads one of three Edge files depending upon size of screen.

       

      couldnt get it to work. pls see code below.

       

       

          <!doctype html>

          <html>

          <head>

          <meta charset="UTF-8">

          <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">

          </script>

          <title>Test</title>

          </head>

          <body>

          <div id=container></div>

          <script>

           if ($(window).width() < 400) {

              $('#container').load ('<object id="EdgeID" type="text/html" data-dw-widget="Edge"

              data="fourbyfour/Assets/fourbyfour.html"></object>');}

          else if ($(window).width() == 400 && $(window).width() < 800) {

              $('#container').load ('<object id="EdgeID1" type="text/html" data-dw-widget="Edge"

              data="atebyate/Assets/atebyate.html"></object>');}

          else {

              $('#container').load ('<object id="EdgeID2" type="text/html" data-dw-widget="Edge"

              data="twelvebysix/Assets/twelvebysix.html"></object>');}

          </script>

          </body>

          </html>

       

       

      appreciate anyones ideas.

      yrs dusty