JSFiddle

  • [Demo] Select All Text in a TextBox on focus

    [Demo] Select All Text in a TextBox on focus

    // Select all test inside Password and Confirm Password textboxes, when user click on them.
    $('#txtPassword').on('focus', function () {
        this.selectionStart ...
  • [Issue] Div beside another Div

    [Issue] Div beside another Div

    <div class="middle">
        <div class="news">
            <div class="newsheader" align="center">
                <p style="text-align:center;"><span style="font-family:Cursive;font-size:18px;font-style:normal;font-weight:bold;text-decoration:none;text-transform:uppercase;color:6633FF;">News And Updates</span>
                </p>
            </div>
            <div class="newscontent" align="center">
                <!--<marquee direction="up">* hiee</marquee>-->
            </div>
        </div>
        <!-- Ending news panel-->
        <div class="igallery">Gallery</div>
    </div>
    <!--middle div over-->
  • [Demo] Crop Image with Jcrop #1 is the latest revision

    [Demo] Crop Image with Jcrop

    displayPreview();
    
    function displayPreview() {
        $('#recipeimge1').Jcrop({
            aspectRatio: 1,
            setSelect: [50, 290, 350, 10],
            addClass: 'jcrop_custom',
            bgColor: 'black',
            bgOpacity: .5,
            sideHandles: false ...
  • [Demo] Rounded ColorPicker Button #9 is the latest revision

    [Demo] Rounded ColorPicker Button

    $(document).ready(function () {
        // Initiate the ColorPicker
        $("#mycolor").colorpicker({
            color: "#ff0000"
        });
    
        // Add radius to the div containing the button
        $(".evo-pointer").css ...
  • [Demo] Determine Browser Version

    [Demo] Determine Browser Version

    var browser;
    
    if ($.browser.msie != 'undefined' && $.browser.msie) {
        browser = "IE";
    } else if ($.browser.webkit) {
        browser = "Safari/Chrome/Opera ";
    } else if ($.browser.mozilla) {
        browser = "FireFox ...
  • [Demo] Generate File in JavaScript #2 is the latest revision

    [Demo] Generate File in JavaScript

    window.onload = function () {
        var textFile = null,
            makeTextFile = function (text) {
                var data = new Blob([text], {
                    type: 'text/plain'
                });
    
                // If we are ...
  • [Demo] Display Star on Canvas

    [Demo] Display Star on Canvas

    function star(ctx, x, y, r, p, m)
            {
                ctx.save();
                ctx.beginPath();
                ctx.translate(x, y);
                ctx.moveTo(0, 0 ...
  • [Demo] Get the Control where mouse is clicked

    [Demo] Get the Control where mouse is clicked

    $(document).on("click", function (event) {
        alert(event.target.id);
    });
  • Sum of two Numbers using AngularJS #38 is the latest revision

    Sum of two Numbers using AngularJS

    <img src="https://angularjs.org/img/AngularJS-large.png" height="50px" weight="50px"/>
    
    <h3>Sum of two Numbers using AngularJS</h3>
    
    <div ng-app="">
         <h3>Using Double Negation</h3>
    
        <p>First Number:
            <input type="text" ng-model="a" />
        </p>
        <p>Second Number:
            <input type="text" ng-model="b" />
        </p>
        <p>Sum: {{ a -- b }}</p>
         <h3>Using Input Type Number ...</h3></div>
  • [Demo] Get last date of the current month in jQuery #60 is the latest revision

    [Demo] Get last date of the current month in jQuery

    var date = new Date();
    var firstDay = new Date(date.getFullYear(), date.getMonth(), 1);
    var lastDay = new Date(date.getFullYear(), date ...