Thursday, January 12, 2012

Hide Entire container and show when all content has been loaded

$(document).ready(function () {
        $("#container").hide();

    });
    $(window).load(function () {
        $("#container").show();
    });

SHow/Hide container using JQuery

function showHide() {

        var display = $("div#containerId").css('display')
        if (display == "none") {
            $("div#searchbar").slideDown("slow");
            $("#searchButton").attr("value", "Hide");
        }

        else {
            $("div#containerId").slideUp("slow");
            $("#searchButton").attr("value", "Show");
        }
   

    }

Thursday, December 29, 2011

Datetime picker not showing inside updatepanel after partial postback

Issue: dattime picker not showing after partial postback
Solution:
<script type="text/javascript">
 function pageLoad(sender, args) {
            $('#<%=txtDate.ClientID %>').datepicker({
                changeMonth: true,
                changeYear: true

            }
            );
        }  
 
Reference: http://stackoverflow.com/questions/7823969/javascript-in-update-panel-doesnt-work-after-partial-postback