What do you want to save?
Add Code snippet
New code examples
-
Other 2021-09-02 11:18:03
resize() { this.elementRef.nativeElement.style.height = '4px'; this.elementRef.nativeElement.style.height = this.elementRef.nativeElement.scrollHeight + 'px'; }
<textarea (keyup)="autoGrowTextZone($event)"></textarea> autoGrowTextZone(e) { e.target.style.height = "0px"; e.target.style.height = (e.target.scrollHeight + 25)+"px"; } Add solution -
Javascript 2021-09-02 09:41:02
ajax post rest api example
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>jQuery.post demo</title> <script src="https://code.jquery.com/jquery-1.10.2.js"></script> </head&g... Add solution -
Javascript 2021-09-01 06:32:01
react detect screen size
import { useState, useEffect } from 'react'; function getWindowDimensions() { const { innerWidth: width, innerHeight: height } = window; return { width, height }; } export default function useWindowDimensions() { const [windowDimensions,... Add solution -
C# 2021-09-01 02:09:01
c# control lost focus event
// This method handles the LostFocus event for textBox1 by setting the // dialog's InitialDirectory property to the text in textBox1. private void textBox1_LostFocus(object sender, System.EventArgs e) { openFileDialog1.InitialDirectory = textBox1.Tex... Add solution -
Other 2021-09-01 00:08:02
best way to define
// BAD if ( eventfade.data( "currently" ) !== "showing" ) { eventfade.stop(); } if ( eventhover.data( "currently" ) !== "showing" ) { eventhover.stop(); } if ( spans.data( "currently" ) !== &qu... Add solution