JSFiddle

  • Stackoverflow - Cannot draw italic text in Firefox canvas #22 is the latest revision

    http://stackoverflow.com/q/15128803/918414

    var canvas = document.getElementById("a");
    var ctx = canvas.getContext('2d');
    ctx.font = "italic 40px Arial";
    ctx.fillText("Impact", 0, 40);
  • Stackoverflow - Change element style on hover another element #1632 is the latest revision

    http://stackoverflow.com/q/6966180/918414

    <p>Hover over 1 and 3 gets styled.</p>
       <div id="one" class="box">1</div><!--
    --><div id="two" class="box">2</div><!--
    --><div id="three" class="box">3</div>
    
    <!-- this works because 4 is after 6 in the markup, 
    despite its display position -->
    <p>Hover over 6 and 4 gets styled.</p>
       <div id="six" class="box">6</div><!--
    --><div id="four" class="box">4</div><!--
    --><div id="five" class="box">5 ...</div></!--
    --></!--
    --></!--></!--
    --></!--
    -->
  • Change another element on :hover #515 is the latest revision

    No-Library (pure JS), HTML, CSS, JavaScript

    <b>sibling method:</b>
    <div>
        <div class="sibling-hover">hover over me</div>
        <div>I do nothing</div>
        <div>I do nothing</div>
        <div class="sibling-highlight">I get highlighted</div>
    </div>
    
    <b>child method:</b>
    <div id="parent">
        <div>hover over me</div>
        <div>hover ...</div></div>
  • Stackoverflow - Post tweet with new line inside it #71 is the latest revision

    http://stackoverflow.com/q/15122284/918414

    <a href="https://twitter.com/intent/tweet?text=123456789012345678901234567890%0A123456789012345678901234567890%0A123456789012345678901234567890" target="_blank">long lines with \n - works!</a><br />
    
    <a href="https://twitter.com/intent/tweet?text=123456789012345678901234567890%20123456789012345678901234567890%20123456789012345678901234567890" target="_blank">long lines with spaces instead of \n - works! (same as \n)</a><br />
    
    <a href="https://twitter.com/intent/tweet?text=123456789012345678901234567890%0A12345678 9012345678901234567890%0A123456789012345678901234567890" target="_blank">long lines with \n ...</a>
  • Stackoverflow - set-interval and clear-interval inside for loop #95 is the latest revision

    http://stackoverflow.com/q/15099929/918414

    var timers = [
            [new Date( ( new Date() ).getTime() + 3000),'party!'], 
            [new Date( ( new Date() ).getTime() + 6000), 'sleep']
        ],
        timer = setInterval( checkTime, 300 ...
  • Stackoverflow - Phonegap code as a web app #20 is the latest revision

    http://stackoverflow.com/q/15080785/918414

    initializeEnvironment();
    initializeDimensions();
    initializePhoneGap( function () {
        //start app  
        var result = 'window.deviceInfo.type: ' + window.deviceInfo.type + '<br />'
            + 'window.deviceInfo.brand: ' + window.deviceInfo.brand ...
  • Stackoverflow - How to validate TextBox and label values #30 is the latest revision

    http://stackoverflow.com/q/15010621/918414

    document.getElementById( 'numbers' ).addEventListener( 'keyup', function ( event ) {
        if( event.srcElement.className == 'validate' ) {
            var value = event.srcElement.value,
                validationValue = event.srcElement ...
  • Stackoverflow - Selector for class prefix inside another class #4 is the latest revision

    http://stackoverflow.com/q/15078853/918414

    <span class="A">
       <span class="B_C">B_C</span>
       <span class="B_D">B_D</span>
       <span class="C_D">C_D</span>
    <span>
        
    
    
    
    
    
                
                
                            
                
                
                
                
                
                
                
                
                
                
    
    
    
    
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        
    <script>
    
    /* by: thinkingstiff.com
    license: http://creativecommons.org/licenses/by-nc-sa/3.0/us/ */
    
    var headerCaption = 'Selector for class ...</script></span></span>
  • Stackoverflow - Dynamically add EventListener in JavaScript #41 is the latest revision

    http://stackoverflow.com/q/15077988/918414

    document.body.addEventListener( 'click', function ( event ) {
        if( event.srcElement.className == 'detailLink' ) {
            detailLinkPress( 'SHOW' );
        };
    } );
    
    function detailLinkPress( str ) {
        alert("Message that will ...
  • Stackoverflow - Style thicker underline CSS

    http://stackoverflow.com/q/15058525/918414

    <h1>underlined</h1>
    next line
    
    
    
    
    
                
                
                            
                
                
                
                
                
                
                
                
                
                
    
    
    
    
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        
    <script>
    
    /* by: thinkingstiff.com
    license: http://creativecommons.org/licenses/by-nc-sa/3.0/us/ */
    
    var headerCaption = 'Style thicker underline ...</script>