Showing posts with label JQuery. Show all posts
Showing posts with label JQuery. Show all posts

Sunday, June 30, 2013

Jquery Date Picker in dd/mm/yyyy Format.

$(document).ready(function () {
        $('.datepicker').datepicker({
            numberOfMonths: 2,
            dateFormat: 'dd/mm/yy',
            changeMonth: true,
            changeYear: true,
            autoSize: true,
            minDate: new Date(),
            maxDate: '+363d',
            showAnim: 'fadeIn',
            yearRange: '2013:2020',
            showOn: 'focus',
            buttonImage: '/Content/images/calendar.gif',
            buttonImageOnly: 'false'
        });
    })

Sunday, February 24, 2013

Select all Html Element whose ID start with 'txt_'



<!DOCTYPE html>
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
</script>
<script>
    $(document).ready(function () {
        $("button").click(function () {
            $("a[target='_blank']").hide();
            $('[id^="txt_"]').hide();
        });
    });
</script>
</head>
<body>

<h2>This is a heading</h2>
<p id="txt_p">This is a paragraph.</p>
<p id="txt_p1">This is another paragraph.</p>

<button>Click me</button>

</body>
</html>

SQL Optimization

  SQL Optimization  1. Add where on your query  2. If you remove some data after the data return then remove the remove condition in the sel...