logo
Tags down

shadow

What is Progressive Enhancement?


By : Progdis
Date : July 29 2020, 05:00 AM
I wish this help you See also Unobtrusive Javascript which is the bedrock progressive enhancement is built.
code :


Share : facebook icon twitter icon

Progressive enhancement with Silverlight


By : Shaun
Date : March 29 2020, 07:55 AM
Does that help The standard example page such as the one built when you run a silverlight app from visual studio handles this for you.
code :
   <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
      <param name="source" value="SilverlightApplication1.xap"/>
      <param name="onError" value="onSilverlightError" />
      <param name="background" value="white" />
      <param name="minRuntimeVersion" value="3.0.40624.0" />
      <param name="autoUpgrade" value="true" />
      <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=3.0.40624.0" style="text-decoration:none">
          <img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style:none"/>
      </a>
    </object>

Progressive enhancement - what to do when JavaScript is off?


By : Cthulhu
Date : March 29 2020, 07:55 AM
seems to work fine The deal with progressive enhancement is that your server side must be fully capable of generating every last bit of HTML that appears in all of your pages. This is obvious, since otherwise (if JS is turned off) there will be no part of your application capable of doing said rendering.
Since the server side must know how to render everything, it doesn't make much sense to generate things (DOM elements/HTML) on the client side from JSON responses the server gives you. Why repeat yourself?

Clean Progressive Enhancement


By : user3174850
Date : March 29 2020, 07:55 AM
With these it helps
So for example it is out of question to set the initial style of the unordered lists to display:none.
code :
<head>
    <style type="text/css">
        body.withjs #menu { display: none; }
    </style>
</head>
<body>
    <script type="text/javascript">
        document.body.className= 'withjs';
        window.onload= function() {
            ...do stuff with menu...
            document.getElementById('menu').style.display= 'block';
        };
    </script>
    ...
    <ul id="menu">
        ...
    </ul>
</body>

Progressive Enhancement with KnockoutJS


By : bob
Date : March 29 2020, 07:55 AM
this will help I explored several approaches here, including generating an anonymous template from the first element, as described here:
http://groups.google.com/group/knockoutjs/browse_thread/thread/3896a640583763d7
code :
ko.bindingHandlers.prerenderedArray = {
    init: function(element, valueAccessor, allBindingsAccessor, viewModel) {
        var binding = valueAccessor();              
        binding.firstTime = true;

        $(element).children().each(function(index, node) {                  
            var value = ko.utils.unwrapObservable(binding.value)[index];                        
            ko.applyBindings(value, node);
        }); 

        return { 'controlsDescendantBindings': true };              
    },
    update: function (element, valueAccessor, allBindingsAccessor, viewModel) {             
        var binding = valueAccessor();
        if (binding.firstTime) {
            binding.firstTime = false;
            return;
        }               

        $(element).children().remove(); 
        ko.applyBindingsToNode(element, { template: { name: binding.template, foreach: binding.value }}, viewModel)
    }
};      

Progressive Enhancement with Yii2


By : Maldonado la Vaganci
Date : March 29 2020, 07:55 AM
wish help you to fix your issue Kudos to you for building with progressive enhancement! Your site will be far more robust for it.
I can't speak specifically for the controller code as I have not used Yii2 (though logically it looks sensible), but I can discuss the second question about the navigation. The easiest way to do it is to have the navbar exist by default and then use JavaScript to hijack the page, converting the navbar into a modal.
shadow
Privacy Policy - Terms - Contact Us © voile276.org