├── .gitignore ├── LICENSE.txt ├── ListingBuilder ├── App.config ├── ListingBuilder.csproj ├── Program.cs └── Properties │ └── AssemblyInfo.cs ├── README.md ├── SnippetListing.html ├── Tests ├── Properties │ └── AssemblyInfo.cs ├── SnippetTests.cs ├── Tests.csproj └── packages.config ├── appveyor.yml ├── build.cmd ├── gulpfile.js ├── jQueryCodeSnippets.sln ├── jQueryCodeSnippets ├── HTML │ └── jQuery │ │ ├── jq.snippet │ │ ├── jqScript.snippet │ │ ├── jqScriptCdnGoogle.snippet │ │ ├── jqScriptCdnMs.snippet │ │ ├── jqScriptMin.snippet │ │ ├── jqScriptUiCdnGoogle.snippet │ │ ├── jqScriptValidateCdnMs.snippet │ │ └── jqScriptValidateUnobtrusiveCdnMs.snippet ├── JavaScript │ └── jQuery │ │ ├── func.snippet │ │ ├── jqAfter.snippet │ │ ├── jqAjax.snippet │ │ ├── jqAjaxAspNetWebService.snippet │ │ ├── jqAppend.snippet │ │ ├── jqAppendTo.snippet │ │ ├── jqAttrGet.snippet │ │ ├── jqAttrRemove.snippet │ │ ├── jqAttrSet.snippet │ │ ├── jqAttrSetFn.snippet │ │ ├── jqAttrSetObj.snippet │ │ ├── jqBefore.snippet │ │ ├── jqBind.snippet │ │ ├── jqBindWithData.snippet │ │ ├── jqBlur.snippet │ │ ├── jqChange.snippet │ │ ├── jqClassAdd.snippet │ │ ├── jqClassRemove.snippet │ │ ├── jqClassToggle.snippet │ │ ├── jqClassToggleSwitch.snippet │ │ ├── jqClick.snippet │ │ ├── jqClone.snippet │ │ ├── jqCloneWithEvents.snippet │ │ ├── jqCssGet.snippet │ │ ├── jqCssSet.snippet │ │ ├── jqCssSetObj.snippet │ │ ├── jqDataGet.snippet │ │ ├── jqDataRemove.snippet │ │ ├── jqDataSet.snippet │ │ ├── jqDataSetObj.snippet │ │ ├── jqDie.snippet │ │ ├── jqDieAll.snippet │ │ ├── jqDieFn.snippet │ │ ├── jqDocReady.snippet │ │ ├── jqDocReadyShort.snippet │ │ ├── jqEach.snippet │ │ ├── jqEachElement.snippet │ │ ├── jqEmpty.snippet │ │ ├── jqFadeIn.snippet │ │ ├── jqFadeInFull.snippet │ │ ├── jqFadeOut.snippet │ │ ├── jqFadeOutFull.snippet │ │ ├── jqFadeTo.snippet │ │ ├── jqFadeToFull.snippet │ │ ├── jqFind.snippet │ │ ├── jqFocus.snippet │ │ ├── jqGet.snippet │ │ ├── jqGetJson.snippet │ │ ├── jqGetScript.snippet │ │ ├── jqHasClass.snippet │ │ ├── jqHeightGet.snippet │ │ ├── jqHeightSet.snippet │ │ ├── jqHide.snippet │ │ ├── jqHideFull.snippet │ │ ├── jqHover.snippet │ │ ├── jqHtmlGet.snippet │ │ ├── jqHtmlSet.snippet │ │ ├── jqInnerHeight.snippet │ │ ├── jqInnerWidth.snippet │ │ ├── jqInsertAfter.snippet │ │ ├── jqInsertBefore.snippet │ │ ├── jqKeyDown.snippet │ │ ├── jqKeyPress.snippet │ │ ├── jqKeyUp.snippet │ │ ├── jqLoadGet.snippet │ │ ├── jqLoadPost.snippet │ │ ├── jqMap.snippet │ │ ├── jqMouseDown.snippet │ │ ├── jqMouseEnter.snippet │ │ ├── jqMouseLeave.snippet │ │ ├── jqMouseMove.snippet │ │ ├── jqMouseOut.snippet │ │ ├── jqMouseOver.snippet │ │ ├── jqMouseUp.snippet │ │ ├── jqNamespace.snippet │ │ ├── jqOff.snippet │ │ ├── jqOffSel.snippet │ │ ├── jqOffsetGet.snippet │ │ ├── jqOffsetParent.snippet │ │ ├── jqOn.snippet │ │ ├── jqOnSel.snippet │ │ ├── jqOne.snippet │ │ ├── jqOneWithData.snippet │ │ ├── jqOuterHeight.snippet │ │ ├── jqOuterWidth.snippet │ │ ├── jqPlugin.snippet │ │ ├── jqPosition.snippet │ │ ├── jqPost.snippet │ │ ├── jqPrepend.snippet │ │ ├── jqPrependTo.snippet │ │ ├── jqRemove.snippet │ │ ├── jqRemoveExp.snippet │ │ ├── jqReplaceAll.snippet │ │ ├── jqReplaceWith.snippet │ │ ├── jqResize.snippet │ │ ├── jqScroll.snippet │ │ ├── jqScrollLeftGet.snippet │ │ ├── jqScrollLeftSet.snippet │ │ ├── jqScrollTopGet.snippet │ │ ├── jqScrollTopSet.snippet │ │ ├── jqSelect.snippet │ │ ├── jqSelectTrigger.snippet │ │ ├── jqShow.snippet │ │ ├── jqShowFull.snippet │ │ ├── jqSlideDown.snippet │ │ ├── jqSlideDownFull.snippet │ │ ├── jqSlideToggle.snippet │ │ ├── jqSlideToggleFull.snippet │ │ ├── jqSlideUp.snippet │ │ ├── jqSlideUpFull.snippet │ │ ├── jqSubmit.snippet │ │ ├── jqSubmitTrigger.snippet │ │ ├── jqTextGet.snippet │ │ ├── jqTextSet.snippet │ │ ├── jqToggle.snippet │ │ ├── jqToggleFull.snippet │ │ ├── jqToggleSwitch.snippet │ │ ├── jqTrigger.snippet │ │ ├── jqTriggerHandler.snippet │ │ ├── jqTriggerHandlerWithData.snippet │ │ ├── jqTriggerWithData.snippet │ │ ├── jqUnbind.snippet │ │ ├── jqUnbindAll.snippet │ │ ├── jqUnload.snippet │ │ ├── jqValGet.snippet │ │ ├── jqValSet.snippet │ │ ├── jqWidthGet.snippet │ │ ├── jqWidthSet.snippet │ │ ├── jqWrap.snippet │ │ ├── jqWrapAll.snippet │ │ └── jqWrapInner.snippet ├── jQueryCodeSnippets.csproj ├── preview.png ├── registry.pkgdef └── source.extension.vsixmanifest └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | build/ 21 | bld/ 22 | [Bb]in/ 23 | [Oo]bj/ 24 | 25 | # Visual Studo 2015 cache/options directory 26 | .vs/ 27 | 28 | # MSTest test Results 29 | [Tt]est[Rr]esult*/ 30 | [Bb]uild[Ll]og.* 31 | 32 | # NUNIT 33 | *.VisualState.xml 34 | TestResult.xml 35 | 36 | # Build Results of an ATL Project 37 | [Dd]ebugPS/ 38 | [Rr]eleasePS/ 39 | dlldata.c 40 | 41 | *_i.c 42 | *_p.c 43 | *_i.h 44 | *.ilk 45 | *.meta 46 | *.obj 47 | *.pch 48 | *.pdb 49 | *.pgc 50 | *.pgd 51 | *.rsp 52 | *.sbr 53 | *.tlb 54 | *.tli 55 | *.tlh 56 | *.tmp 57 | *.tmp_proj 58 | *.log 59 | *.vspscc 60 | *.vssscc 61 | .builds 62 | *.pidb 63 | *.svclog 64 | *.scc 65 | 66 | # Chutzpah Test files 67 | _Chutzpah* 68 | 69 | # Visual C++ cache files 70 | ipch/ 71 | *.aps 72 | *.ncb 73 | *.opensdf 74 | *.sdf 75 | *.cachefile 76 | 77 | # Visual Studio profiler 78 | *.psess 79 | *.vsp 80 | *.vspx 81 | 82 | # TFS 2012 Local Workspace 83 | $tf/ 84 | 85 | # Guidance Automation Toolkit 86 | *.gpState 87 | 88 | # ReSharper is a .NET coding add-in 89 | _ReSharper*/ 90 | *.[Rr]e[Ss]harper 91 | *.DotSettings.user 92 | 93 | # JustCode is a .NET coding addin-in 94 | .JustCode 95 | 96 | # TeamCity is a build add-in 97 | _TeamCity* 98 | 99 | # DotCover is a Code Coverage Tool 100 | *.dotCover 101 | 102 | # NCrunch 103 | _NCrunch_* 104 | .*crunch*.local.xml 105 | 106 | # MightyMoose 107 | *.mm.* 108 | AutoTest.Net/ 109 | 110 | # Web workbench (sass) 111 | .sass-cache/ 112 | 113 | # Installshield output folder 114 | [Ee]xpress/ 115 | 116 | # DocProject is a documentation generator add-in 117 | DocProject/buildhelp/ 118 | DocProject/Help/*.HxT 119 | DocProject/Help/*.HxC 120 | DocProject/Help/*.hhc 121 | DocProject/Help/*.hhk 122 | DocProject/Help/*.hhp 123 | DocProject/Help/Html2 124 | DocProject/Help/html 125 | 126 | # Click-Once directory 127 | publish/ 128 | 129 | # Publish Web Output 130 | *.[Pp]ublish.xml 131 | *.azurePubxml 132 | # TODO: Comment the next line if you want to checkin your web deploy settings 133 | # but database connection strings (with potential passwords) will be unencrypted 134 | *.pubxml 135 | *.publishproj 136 | 137 | # NuGet Packages 138 | *.nupkg 139 | # The packages folder can be ignored because of Package Restore 140 | packages/* 141 | # Folder with nuget.exe (build.cmd will restore this) 142 | .nuget/* 143 | .nuget/packages.config 144 | 145 | # Windows Azure Build Output 146 | csx/ 147 | *.build.csdef 148 | 149 | # Windows Store app package directory 150 | AppPackages/ 151 | 152 | # Others 153 | *.[Cc]ache 154 | ClientBin/ 155 | [Ss]tyle[Cc]op.* 156 | ~$* 157 | *~ 158 | *.dbmdl 159 | *.dbproj.schemaview 160 | *.pfx 161 | *.publishsettings 162 | node_modules/ 163 | bower_components/ 164 | 165 | # RIA/Silverlight projects 166 | Generated_Code/ 167 | 168 | # Backup & report files from converting an old project file 169 | # to a newer Visual Studio version. Backup files are not needed, 170 | # because we have git ;-) 171 | _UpgradeReport_Files/ 172 | Backup*/ 173 | UpgradeLog*.XML 174 | UpgradeLog*.htm 175 | 176 | # SQL Server files 177 | *.mdf 178 | *.ldf 179 | 180 | # Business Intelligence projects 181 | *.rdl.data 182 | *.bim.layout 183 | *.bim_*.settings 184 | 185 | # Microsoft Fakes 186 | FakesAssemblies/ 187 | 188 | # Node.js Tools for Visual Studio 189 | .ntvs_analysis.dat 190 | 191 | # Visual Studio 6 build log 192 | *.plg 193 | 194 | # Visual Studio 6 workspace options file 195 | *.opt 196 | 197 | # xunit 198 | .xunit/* -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Kyle Spearrin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /ListingBuilder/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /ListingBuilder/ListingBuilder.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {C5E392D6-D12C-4361-9E5C-5358DCCCB1C9} 8 | Exe 9 | Properties 10 | ListingBuilder 11 | ListingBuilder 12 | v4.6 13 | 512 14 | 15 | 16 | 17 | AnyCPU 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | AnyCPU 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | Designer 51 | 52 | 53 | 54 | 61 | -------------------------------------------------------------------------------- /ListingBuilder/Program.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Linq; 3 | using System.Text; 4 | using System.Xml; 5 | 6 | namespace ListingBuilder 7 | { 8 | class Program 9 | { 10 | static void Main(string[] args) 11 | { 12 | string readPath = @"../../../jQueryCodeSnippets"; 13 | string listingFilePath = @"../../../SnippetListing.html"; 14 | StringBuilder tableSb = new StringBuilder(); 15 | 16 | tableSb.AppendLine(""); 17 | tableSb.AppendLine(""); 18 | tableSb.AppendLine(""); 19 | tableSb.AppendLine(""); 20 | tableSb.AppendLine(""); 21 | 22 | foreach (var snippetFile in Directory.EnumerateFiles(readPath, "*.snippet", SearchOption.AllDirectories).OrderBy(i => i)) 23 | { 24 | var snippetDoc = new XmlDocument(); 25 | snippetDoc.Load(snippetFile); 26 | 27 | var shortcutNode = snippetDoc.GetElementsByTagName("Shortcut"); 28 | var shortcut = shortcutNode[0].InnerText; 29 | 30 | var descriptionNode = snippetDoc.GetElementsByTagName("Description"); 31 | var description = descriptionNode[0].InnerText; 32 | 33 | tableSb.AppendLine(string.Format("", snippetFile.Contains("\\HTML") ? "HTML" : "JavaScript", shortcut, description)); 34 | } 35 | 36 | tableSb.AppendLine(""); 37 | tableSb.AppendLine("
TypeShortcutDescription
{0}{1}{2}
"); 38 | 39 | using (StreamWriter writer = new StreamWriter(listingFilePath, false)) 40 | { 41 | writer.WriteLine(tableSb.ToString()); 42 | } 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /ListingBuilder/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("ListingBuilder")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ListingBuilder")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("e0a22101-6ff3-40a2-a3fa-05f268addfac")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Visual Studio jQuery Code Snippets 2 | 3 | [![Build status](https://ci.appveyor.com/api/projects/status/3o0b1ofu94xuqpsa?svg=true)](https://ci.appveyor.com/project/kspearrin/visual-studio-jquery-code-snippets) 4 | 5 | This project hosts a collection of common jQuery code snippets for use in Visual Studio 2012-2019. See a demo video on YouTube here: . 6 | 7 | ## Installation 8 | 9 | 1. Open Visual Studio 2012/2013/2015/2017/2019. 10 | 2. Navigate to **Tools** > **Extensions and Updates**. 11 | 3. Search **Online** for "jquery code snippets". 12 | 4. Select the "jQuery Code Snippets" extension and click **Install**. 13 | 5. Restart Visual Studio. 14 | 6. Start [using the code snippets](https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets/wiki/Using-Code-Snippets). 15 | 16 | You can also download and install the extension from the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=kspearrin.jQueryCodeSnippets). 17 | 18 | ## Snippet Listing 19 | 20 | There are over 130 code snippets for jQuery included. Check out the [snippet listing](https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets/wiki/Snippet-Listing). 21 | 22 | ## Changelog 23 | 24 | **v1.8.0** 25 | - Added VS 2019 support. 26 | 27 | [Previous Versions](https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets/wiki/Release-Notes) 28 | 29 | ## Contributing 30 | 31 | Please feel free to submit pull requests to the `master` branch. 32 | -------------------------------------------------------------------------------- /Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Tests")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Tests")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("5138a23a-cb00-4368-bff7-bf0d62b878fd")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Tests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | before_build: 2 | - rd "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Amazon Web Services LLC" /s /q 3 | build_script: 4 | - build.cmd 5 | test: off 6 | deploy: off -------------------------------------------------------------------------------- /build.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | cd %~dp0 3 | 4 | SETLOCAL 5 | SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe 6 | 7 | IF EXIST %CACHED_NUGET% goto copynuget 8 | IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet 9 | @powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'" 10 | 11 | :copynuget 12 | IF EXIST .nuget\nuget.exe goto build 13 | md .nuget 14 | copy %CACHED_NUGET% .nuget\nuget.exe > nul 15 | 16 | :build 17 | call npm install -g gulp 18 | call npm install 19 | call gulp 20 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | var p = require('./package.json') 2 | gulp = require('gulp'), 3 | xmlpoke = require('gulp-xmlpoke') 4 | msbuild = require('gulp-msbuild') 5 | xunit = require('gulp-xunit-runner') 6 | flatten = require('gulp-flatten') 7 | nuget = require('nuget-runner')({ 8 | apiKey: process.env.NUGET_API_KEY, 9 | nugetPath: '.nuget/nuget.exe' 10 | }); 11 | 12 | gulp.task('default', ['test']); 13 | 14 | gulp.task('manifest', [], function () { 15 | return gulp 16 | .src('jQueryCodeSnippets/source.extension.vsixmanifest') 17 | .pipe(xmlpoke({ 18 | replacements : [{ 19 | xpath : "//PackageManifest:Identity/@Version", 20 | namespaces : { "PackageManifest" : "http://schemas.microsoft.com/developer/vsx-schema/2011" }, 21 | value: p.version 22 | }] 23 | })) 24 | .pipe(gulp.dest('jQueryCodeSnippets')); 25 | }); 26 | 27 | gulp.task('restore', ['manifest'], function () { 28 | return nuget 29 | .restore({ 30 | packages: 'jQueryCodeSnippets.sln', 31 | verbosity: 'normal' 32 | }); 33 | }); 34 | 35 | gulp.task('build', ['restore'], function() { 36 | return gulp 37 | .src('jQueryCodeSnippets.sln') 38 | .pipe(msbuild({ 39 | toolsVersion: 12.0, 40 | targets: ['Clean', 'Build'], 41 | errorOnFail: true, 42 | configuration: 'Release' 43 | })); 44 | }); 45 | 46 | gulp.task('copy', ['build'], function(){ 47 | return gulp 48 | .src('packages/xunit.runner.console.*/tools/*') 49 | .pipe(flatten()) 50 | .pipe(gulp.dest('.xunit')); 51 | }); 52 | 53 | gulp.task('test', ['copy'], function() { 54 | return gulp 55 | .src(['Tests/bin/Release/Tests.dll'], {read: false}) 56 | .pipe(xunit({ 57 | executable: '.xunit' 58 | })); 59 | }); 60 | -------------------------------------------------------------------------------- /jQueryCodeSnippets.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.26228.4 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{4E747CB5-56E9-4E50-BDD1-9C47A1A263D0}" 7 | ProjectSection(SolutionItems) = preProject 8 | .gitignore = .gitignore 9 | appveyor.yml = appveyor.yml 10 | README.md = README.md 11 | EndProjectSection 12 | EndProject 13 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "jQueryCodeSnippets", "jQueryCodeSnippets\jQueryCodeSnippets.csproj", "{C1131DC7-264F-467E-90E2-ED2ED49BE43F}" 14 | EndProject 15 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{90164978-E461-4BD8-8F21-15B199E7AFB1}" 16 | EndProject 17 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ListingBuilder", "ListingBuilder\ListingBuilder.csproj", "{C5E392D6-D12C-4361-9E5C-5358DCCCB1C9}" 18 | EndProject 19 | Global 20 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 21 | Debug|Any CPU = Debug|Any CPU 22 | Release|Any CPU = Release|Any CPU 23 | EndGlobalSection 24 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 25 | {C1131DC7-264F-467E-90E2-ED2ED49BE43F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 26 | {C1131DC7-264F-467E-90E2-ED2ED49BE43F}.Debug|Any CPU.Build.0 = Debug|Any CPU 27 | {C1131DC7-264F-467E-90E2-ED2ED49BE43F}.Release|Any CPU.ActiveCfg = Release|Any CPU 28 | {C1131DC7-264F-467E-90E2-ED2ED49BE43F}.Release|Any CPU.Build.0 = Release|Any CPU 29 | {90164978-E461-4BD8-8F21-15B199E7AFB1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 30 | {90164978-E461-4BD8-8F21-15B199E7AFB1}.Debug|Any CPU.Build.0 = Debug|Any CPU 31 | {90164978-E461-4BD8-8F21-15B199E7AFB1}.Release|Any CPU.ActiveCfg = Release|Any CPU 32 | {90164978-E461-4BD8-8F21-15B199E7AFB1}.Release|Any CPU.Build.0 = Release|Any CPU 33 | {C5E392D6-D12C-4361-9E5C-5358DCCCB1C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 34 | {C5E392D6-D12C-4361-9E5C-5358DCCCB1C9}.Debug|Any CPU.Build.0 = Debug|Any CPU 35 | {C5E392D6-D12C-4361-9E5C-5358DCCCB1C9}.Release|Any CPU.ActiveCfg = Release|Any CPU 36 | {C5E392D6-D12C-4361-9E5C-5358DCCCB1C9}.Release|Any CPU.Build.0 = Release|Any CPU 37 | EndGlobalSection 38 | GlobalSection(SolutionProperties) = preSolution 39 | HideSolutionNode = FALSE 40 | EndGlobalSection 41 | EndGlobal 42 | -------------------------------------------------------------------------------- /jQueryCodeSnippets/HTML/jQuery/jq.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jq 9 | John Sheehan (@johnsheehan) 10 | A script tag with a $(document).ready() shortcut. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jq 13 |
14 | 15 | 16 | $$(function() { 17 | $end$ 18 | }); 19 | ]]> 20 | 21 |
22 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/HTML/jQuery/jqScript.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqScript 9 | John Sheehan (@johnsheehan) 10 | A script tag with a jQuery src. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqScript 13 |
14 | 15 | 16 | 17 | path 18 | Path to jQuery script 19 | /scripts/jquery-2.2.0.min.js 20 | 21 | 22 | 23 | 24 | 25 | $end$]]> 26 | 27 |
28 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/HTML/jQuery/jqScriptCdnGoogle.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqScriptCdnGoogle 9 | John Sheehan (@johnsheehan) 10 | A script tag with a jQuery src using Google's CDN. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqScriptCdnGoogle 13 |
14 | 15 | 16 | 17 | version 18 | Library version number 19 | 2.2.0 20 | 21 | 22 | 23 | 24 | 25 | $end$]]> 26 | 27 |
28 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/HTML/jQuery/jqScriptCdnMs.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqScriptCdnMs 9 | John Sheehan (@johnsheehan) 10 | A script tag with a jQuery src using Microsoft's CDN. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqScriptCdnMs 13 |
14 | 15 | 16 | 17 | version 18 | Library version number 19 | 2.2.0 20 | 21 | 22 | 23 | 24 | 25 | $end]]> 26 | 27 |
28 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/HTML/jQuery/jqScriptMin.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqScriptMin 9 | John Sheehan (@johnsheehan) 10 | A script tag with a jQuery src and a $(document).ready() shortcut. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqScriptMin 13 |
14 | 15 | 16 | 17 | path 18 | Path to jQuery script 19 | /scripts/jquery-2.2.0.min.js 20 | 21 | 22 | 23 | 24 | 25 | $$(function() { 26 | $end$ 27 | }); 28 | ]]> 29 | 30 |
31 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/HTML/jQuery/jqScriptUiCdnGoogle.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqScriptUiCdnGoogle 9 | John Sheehan (@johnsheehan) 10 | A script tag with a jQuery UI src using Google's CDN. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqScriptUiCdnGoogle 13 |
14 | 15 | 16 | 17 | version 18 | Library version number 19 | 1.11.4 20 | 21 | 22 | 23 | 24 | 25 | $end$]]> 26 | 27 |
28 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/HTML/jQuery/jqScriptValidateCdnMs.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqScriptValidateCdnMs 9 | John Sheehan (@johnsheehan) 10 | A script tag with a jQuery validation plugin src using Microsoft's CDN. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqScriptValidateCdnMs 13 |
14 | 15 | 16 | 17 | version 18 | Library version number 19 | 1.14.0 20 | 21 | 22 | 23 | 24 | 25 | $end$]]> 26 | 27 |
28 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/HTML/jQuery/jqScriptValidateUnobtrusiveCdnMs.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqScriptValidateUnobtrusiveCdnMs 9 | Kyle Spearrin (www.kylespearrin.com) 10 | A script tag with a jQuery unobtrusive validation plugin src using Microsoft's CDN 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqScriptValidateUnobtrusiveCdnMs 13 |
14 | 15 | 16 | 17 | version 18 | Library version number 19 | 5.2.3 20 | 21 | 22 | 23 | 24 | 25 | $end$]]> 26 | 27 |
28 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/func.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | func 9 | John Sheehan (@johnsheehan) 10 | An anonymous function. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | func 13 |
14 | 15 | 16 | 17 | param 18 | Parameter 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqAfter.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqAfter 9 | John Sheehan (@johnsheehan) 10 | Insert content, specified by the parameter, after each element in the set of matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqAfter 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to be modified 19 | selector 20 | 21 | 22 | 23 | 24 | content 25 | HTML string, DOM element, array of elements, or jQuery object to insert after each element in the set of matched elements. 26 | content 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqAjax.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqAjax 9 | John Sheehan (@johnsheehan) 10 | Perform an asynchronous HTTP (Ajax) request. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqAjax 13 |
14 | 15 | 16 | 17 | url 18 | The URL for the request 19 | /url 20 | 21 | 22 | 23 | 24 | method 25 | HTTP Method to use (GET, POST, etc.) 26 | POST 27 | 28 | 29 | 30 | 31 | data 32 | Data to send (querystring) 33 | name=John&location=Boston 34 | 35 | 36 | 37 | 38 | dataType 39 | Options: xml|json|jsonp|text|html|script 40 | json 41 | 42 | 43 | 44 | 45 | url 46 | URL to call 47 | /url 48 | 49 | 50 | 51 | 52 | 61 | 62 |
63 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqAjaxAspNetWebService.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqAjaxAspNetWebService 9 | John Sheehan (@johnsheehan) 10 | Perform an asynchronous HTTP (Ajax) request to a ASP.NET web service. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqAjaxAspNetWebService 13 |
14 | 15 | 16 | 17 | url 18 | The URL for the request 19 | WebService.asmx/WebMethodName 20 | 21 | 22 | 23 | 24 | data 25 | Data to send 26 | {} 27 | 28 | 29 | 30 | 31 | dataType 32 | Options: xml|json|jsonp|text|html|script 33 | json 34 | 35 | 36 | 37 | 38 | 48 | 49 |
50 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqAppend.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqAppend 9 | John Sheehan (@johnsheehan) 10 | Insert content, specified by the parameter, to the end of each element in the set of matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqAppend 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to be modified 19 | selector 20 | 21 | 22 | 23 | 24 | content 25 | Content to be appended 26 | content 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqAppendTo.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqAppendTo 9 | John Sheehan (@johnsheehan) 10 | Insert every element in the set of matched elements to the end of the target. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqAppendTo 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to be modified 19 | selector 20 | 21 | 22 | 23 | 24 | content 25 | Content to be appended 26 | content 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqAttrGet.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqAttrGet 9 | John Sheehan (@johnsheehan) 10 | Get the value of an attribute for the first element in the set of matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqAttrGet 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) containing attribute to be retrieved 19 | selector 20 | 21 | 22 | 23 | 24 | attributeName 25 | The name of the attribute to get. 26 | attributeName 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqAttrRemove.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqAttrRemove 9 | John Sheehan (@johnsheehan) 10 | Remove an attribute from each element in the set of matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqAttrRemove 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) containing attribute to be removed 19 | selector 20 | 21 | 22 | 23 | 24 | attributeName 25 | An attribute to remove; as of version 1.7, it can be a space-separated list of attributes. 26 | attributeName 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqAttrSet.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqAttrSet 9 | John Sheehan (@johnsheehan) 10 | Set one or more attributes for the set of matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqAttrSet 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to set attribute on 19 | selector 20 | 21 | 22 | 23 | 24 | attributeName 25 | The name of the attribute to set. 26 | attributeName 27 | 28 | 29 | 30 | 31 | value 32 | A value to set for the attribute. 33 | value 34 | 35 | 36 | 37 | 38 | 39 | 40 |
41 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqAttrSetFn.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqAttrSetFn 9 | John Sheehan (@johnsheehan) 10 | Set one or more attributes for the set of matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqAttrSetFn 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to set attribute on 19 | selector 20 | 21 | 22 | 23 | 24 | attributeName 25 | The name of the attribute to set. 26 | attributeName 27 | 28 | 29 | 30 | 31 | 34 | 35 |
36 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqAttrSetObj.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqAttrSetObj 9 | John Sheehan (@johnsheehan) 10 | Set one or more attributes for the set of matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqAttrSetObj 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to set attributes on 19 | selector 20 | 21 | 22 | 23 | 24 | name 25 | Name of attribute 26 | name 27 | 28 | 29 | 30 | 31 | value 32 | Value to set 33 | value 34 | 35 | 36 | 37 | 38 | 42 | 43 |
44 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqBefore.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqBefore 9 | John Sheehan (@johnsheehan) 10 | Insert content, specified by the parameter, before each element in the set of matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqBefore 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to be modified 19 | selector 20 | 21 | 22 | 23 | 24 | content 25 | HTML string, DOM element, array of elements, or jQuery object to insert before each element in the set of matched elements. 26 | content 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqBind.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqBind 9 | John Sheehan (@johnsheehan) 10 | Attach a handler to an event for the elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqBind 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | eventType 25 | A string containing one or more DOM event types, such as "click" or "submit," or custom event names. 26 | eventType 27 | 28 | 29 | 30 | 31 | 34 | 35 |
36 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqBindWithData.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqBindWithData 9 | John Sheehan (@johnsheehan) 10 | Attach a handler to an event for the elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqBindWithData 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | eventType 25 | A string containing one or more DOM event types, such as "click" or "submit," or custom event names. 26 | eventType 27 | 28 | 29 | 30 | 31 | eventData 32 | An object containing data that will be passed to the event handler. 33 | { name: "value" } 34 | 35 | 36 | 37 | 38 | 41 | 42 |
43 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqBlur.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqBlur 9 | John Sheehan (@johnsheehan) 10 | Bind an event handler to the "blur" JavaScript event, or trigger that event on an element. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqBlur 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | 28 | 29 |
30 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqChange.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqChange 9 | John Sheehan (@johnsheehan) 10 | Bind an event handler to the "change" JavaScript event, or trigger that event on an element. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqChange 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | 28 | 29 |
30 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqClassAdd.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqClassAdd 9 | John Sheehan (@johnsheehan) 10 | Adds the specified class(es) to each of the set of matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqClassAdd 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to modify 19 | selector 20 | 21 | 22 | 23 | 24 | className 25 | One or more space-separated classes to be added to the class attribute of each matched element. 26 | className 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqClassRemove.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqClassRemove 9 | John Sheehan (@johnsheehan) 10 | Remove a single class, multiple classes, or all classes from each element in the set of matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqClassRemove 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to modify 19 | selector 20 | 21 | 22 | 23 | 24 | className 25 | One or more space-separated classes to be removed from the class attribute of each matched element. 26 | className 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqClassToggle.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqClassToggle 9 | John Sheehan (@johnsheehan) 10 | Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqClassToggle 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to modify 19 | selector 20 | 21 | 22 | 23 | 24 | className 25 | One or more class names (separated by spaces) to be toggled for each element in the matched set. 26 | className 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqClassToggleSwitch.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqClassToggleSwitch 9 | John Sheehan (@johnsheehan) 10 | Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqClassToggleSwitch 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to modify 19 | selector 20 | 21 | 22 | 23 | 24 | className 25 | One or more class names (separated by spaces) to be toggled for each element in the matched set. 26 | className 27 | 28 | 29 | 30 | 31 | switch 32 | A Boolean (not just truthy/falsy) value to determine whether the class should be added or removed. 33 | switch 34 | 35 | 36 | 37 | 38 | 39 | 40 |
41 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqClick.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqClick 9 | John Sheehan (@johnsheehan) 10 | Bind an event handler to the "click" JavaScript event, or trigger that event on an element. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqClick 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | 28 | 29 |
30 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqClone.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqClone 9 | John Sheehan (@johnsheehan) 10 | Create a deep copy of the set of matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqClone 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to be cloned 19 | selector 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqCloneWithEvents.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqCloneWithEvents 9 | John Sheehan (@johnsheehan) 10 | Create a deep copy of the set of matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqCloneWithEvents 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to be cloned 19 | selector 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqCssGet.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqCssGet 9 | John Sheehan (@johnsheehan) 10 | Get the computed style properties for the first element in the set of matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqCssGet 13 |
14 | 15 | 16 | 17 | selector 18 | Element containing style to be retrieved 19 | selector 20 | 21 | 22 | 23 | 24 | propertyName 25 | A CSS property. 26 | propertyName 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqCssSet.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqCssSet 9 | John Sheehan (@johnsheehan) 10 | Set one or more CSS properties for the set of matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqCssSet 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to set style properties on 19 | selector 20 | 21 | 22 | 23 | 24 | propertyName 25 | A CSS property name. 26 | propertyName 27 | 28 | 29 | 30 | 31 | value 32 | A value to set for the property. 33 | value 34 | 35 | 36 | 37 | 38 | 39 | 40 |
41 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqCssSetObj.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqCssSetObj 9 | John Sheehan (@johnsheehan) 10 | Set one or more CSS properties for the set of matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqCssSetObj 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to set style properties on 19 | selector 20 | 21 | 22 | 23 | 24 | propertyName 25 | A CSS property name. 26 | propertyName 27 | 28 | 29 | 30 | 31 | value 32 | A value to set for the property. 33 | value 34 | 35 | 36 | 37 | 38 | 42 | 43 |
44 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqDataGet.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqDataGet 9 | John Sheehan (@johnsheehan) 10 | Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqDataGet 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) containing data to be retrieved 19 | selector 20 | 21 | 22 | 23 | 24 | key 25 | Name of the data stored. 26 | key 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqDataRemove.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqDataRemove 9 | John Sheehan (@johnsheehan) 10 | Remove a previously-stored piece of data. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqDataRemove 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) containing data to be removed 19 | selector 20 | 21 | 22 | 23 | 24 | element 25 | A DOM element from which to remove data. 26 | element 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqDataSet.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqDataSet 9 | John Sheehan (@johnsheehan) 10 | Store arbitrary data associated with the matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqDataSet 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to set data on 19 | selector 20 | 21 | 22 | 23 | 24 | key 25 | A string naming the piece of data to set. 26 | key 27 | 28 | 29 | 30 | 31 | value 32 | The new data value; it can be any Javascript type including Array or Object. 33 | value 34 | 35 | 36 | 37 | 38 | 39 | 40 |
41 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqDataSetObj.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqDataSetObj 9 | John Sheehan (@johnsheehan) 10 | Store arbitrary data associated with the matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqDataSetObj 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to set data on 19 | selector 20 | 21 | 22 | 23 | 24 | key 25 | A string naming the piece of data to set. 26 | key 27 | 28 | 29 | 30 | 31 | value 32 | The new data value; it can be any Javascript type including Array or Object. 33 | value 34 | 35 | 36 | 37 | 38 | 42 | 43 |
44 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqDie.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqDie 9 | John Sheehan (@johnsheehan) 10 | Remove event handlers previously attached using .live() from the elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqDie 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to unbind 19 | selector 20 | 21 | 22 | 23 | 24 | eventType 25 | A string containing a JavaScript event type, such as click or keydown. 26 | eventType 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqDieAll.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqDieAll 9 | John Sheehan (@johnsheehan) 10 | Remove event handlers previously attached using .live() from the elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqDieAll 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to remove bindings 19 | selector 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqDieFn.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqDieFn 9 | John Sheehan (@johnsheehan) 10 | Remove event handlers previously attached using .live() from the elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqDieFn 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to unbind 19 | selector 20 | 21 | 22 | 23 | 24 | eventType 25 | A string containing a JavaScript event type, such as click or keydown. 26 | eventType 27 | 28 | 29 | 30 | 31 | handler 32 | The function that is no longer to be executed. 33 | handler 34 | 35 | 36 | 37 | 38 | 39 | 40 |
41 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqDocReady.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqDocReady 9 | John Sheehan (@johnsheehan) 10 | Function to execute when the DOM is fully loaded. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqDocReady 13 |
14 | 15 | 18 | 19 |
20 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqDocReadyShort.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqDocReadyShort 9 | John Sheehan (@johnsheehan) 10 | Function to execute when the DOM is fully loaded. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqDocReadyShort 13 |
14 | 15 | 18 | 19 |
20 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqEach.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqEach 9 | Graham Charles 10 | A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. Arrays and array-like objects with a length property (such as a function's arguments object) are iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqEach 13 |
14 | 15 | 16 | 17 | collection 18 | The object or array to iterate over. 19 | collection 20 | 21 | 22 | 23 | 24 | 27 | 28 |
29 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqEachElement.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqEachElement 9 | John Sheehan (@johnsheehan) 10 | Iterate over a jQuery object, executing a function for each matched element. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqEachElement 13 |
14 | 15 | 16 | 17 | selector 18 | The elements to loop over 19 | selector 20 | 21 | 22 | 23 | 24 | 28 | 29 |
30 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqEmpty.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqEmpty 9 | John Sheehan (@johnsheehan) 10 | Remove all child nodes of the set of matched elements from the DOM. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqEmpty 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to be modified 19 | selector 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqFadeIn.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqFadeIn 9 | John Sheehan (@johnsheehan) 10 | Display the matched elements by fading them to opaque. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqFadeIn 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to fade in. 19 | selector 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqFadeInFull.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqFadeInFull 9 | John Sheehan (@johnsheehan) 10 | Display the matched elements by fading them to opaque. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqFadeInFull 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to fade in. 19 | selector 20 | 21 | 22 | 23 | 24 | duration 25 | A string or number determining how long the animation will run. 26 | duration 27 | 28 | 29 | 30 | 31 | 34 | 35 |
36 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqFadeOut.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqFadeOut 9 | John Sheehan (@johnsheehan) 10 | Hide the matched elements by fading them to transparent. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqFadeOut 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to fade out. 19 | selector 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqFadeOutFull.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqFadeOutFull 9 | John Sheehan (@johnsheehan) 10 | Hide the matched elements by fading them to transparent. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqFadeOutFull 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to fade out. 19 | selector 20 | 21 | 22 | 23 | 24 | duration 25 | A string or number determining how long the animation will run. 26 | duration 27 | 28 | 29 | 30 | 31 | 34 | 35 |
36 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqFadeTo.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqFadeTo 9 | John Sheehan (@johnsheehan) 10 | Adjust the opacity of the matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqFadeTo 13 |
14 | 15 | 16 | 17 | selector 18 | jQuery selector 19 | selector 20 | 21 | 22 | 23 | 24 | duration 25 | A string or number determining how long the animation will run. 26 | duration 27 | 28 | 29 | 30 | 31 | opacity 32 | A number between 0 and 1 denoting the target opacity. 33 | opacity 34 | 35 | 36 | 37 | 38 | 39 | 40 |
41 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqFadeToFull.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqFadeToFull 9 | John Sheehan (@johnsheehan) 10 | Adjust the opacity of the matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqFadeToFull 13 |
14 | 15 | 16 | 17 | selector 18 | jQuery selector 19 | selector 20 | 21 | 22 | 23 | 24 | duration 25 | A string or number determining how long the animation will run. 26 | duration 27 | 28 | 29 | 30 | 31 | opacity 32 | A number between 0 and 1 denoting the target opacity. 33 | opacity 34 | 35 | 36 | 37 | 38 | 41 | 42 |
43 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqFind.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqFind 9 | Kyle Spearrin (www.kylespearrin.com) 10 | Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqFind 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) containing descendant element(s) to be found 19 | selector 20 | 21 | 22 | 23 | 24 | selector2 25 | A string containing a selector expression to match elements against. 26 | selector2 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqFocus.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqFocus 9 | John Sheehan (@johnsheehan) 10 | Bind an event handler to the "focus" JavaScript event, or trigger that event on an element. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqFocus 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | 28 | 29 |
30 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqGet.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqGet 9 | John Sheehan (@johnsheehan) 10 | Load data from the server using a HTTP GET request. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqGet 13 |
14 | 15 | 16 | 17 | url 18 | A string containing the URL to which the request is sent. 19 | /url 20 | 21 | 22 | 23 | 24 | data 25 | A plain object or string that is sent to the server with the request. 26 | { name: "value" } 27 | 28 | 29 | 30 | 31 | dataType 32 | The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html). 33 | json 34 | 35 | 36 | 37 | 38 | 44 | 45 |
46 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqGetJson.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqGetJson 9 | John Sheehan (@johnsheehan) 10 | Load JSON-encoded data from the server using a GET HTTP request. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqGetJson 13 |
14 | 15 | 16 | 17 | url 18 | A string containing the URL to which the request is sent. 19 | /url 20 | 21 | 22 | 23 | 24 | data 25 | A plain object or string that is sent to the server with the request. 26 | { name: "value" } 27 | 28 | 29 | 30 | 31 | 36 | 37 |
38 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqGetScript.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqGetScript 9 | John Sheehan (@johnsheehan) 10 | Load a JavaScript file from the server using a GET HTTP request, then execute it. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqGetScript 13 |
14 | 15 | 16 | 17 | url 18 | A string containing the URL to which the request is sent. 19 | script.js 20 | 21 | 22 | 23 | 24 | 27 | 28 |
29 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqHasClass.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqHasClass 9 | John Sheehan (@johnsheehan) 10 | Determine whether any of the matched elements are assigned the given class. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqHasClass 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to check 19 | selector 20 | 21 | 22 | 23 | 24 | className 25 | The class name to search for. 26 | className 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqHeightGet.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqHeightGet 9 | John Sheehan (@johnsheehan) 10 | Get the current computed height for the first element in the set of matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqHeightGet 13 |
14 | 15 | 16 | 17 | selector 18 | Element to select 19 | selector 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqHeightSet.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqHeightSet 9 | John Sheehan (@johnsheehan) 10 | Set the CSS height of every matched element. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqHeightSet 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to select 19 | selector 20 | 21 | 22 | 23 | 24 | value 25 | An integer representing the number of pixels, or an integer with an optional unit of measure appended (as a string). 26 | value 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqHide.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqHide 9 | John Sheehan (@johnsheehan) 10 | Hide the matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqHide 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to select 19 | selector 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqHideFull.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqHideFull 9 | John Sheehan (@johnsheehan) 10 | Hide the matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqHideFull 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to select. 19 | selector 20 | 21 | 22 | 23 | 24 | duration 25 | A string or number determining how long the animation will run. 26 | "slow" 27 | 28 | 29 | 30 | 31 | 34 | 35 |
36 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqHover.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqHover 9 | John Sheehan (@johnsheehan) 10 | Bind two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqHover 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to select 19 | selector 20 | 21 | 22 | 23 | 24 | 31 | 32 |
33 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqHtmlGet.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqHtmlGet 9 | John Sheehan (@johnsheehan) 10 | Get the HTML contents of the first element in the set of matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqHtmlGet 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to be retrieved 19 | selector 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqHtmlSet.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqHtmlSet 9 | John Sheehan (@johnsheehan) 10 | Set the HTML contents of each element in the set of matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqHtmlSet 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to be modified 19 | selector 20 | 21 | 22 | 23 | 24 | htmlString 25 | A string of HTML to set as the content of each matched element. 26 | htmlString 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqInnerHeight.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqInnerHeight 9 | John Sheehan (@johnsheehan) 10 | Get the current computed height for the first element in the set of matched elements, including padding but not border. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqInnerHeight 13 |
14 | 15 | 16 | 17 | selector 18 | Element to select 19 | selector 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqInnerWidth.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqInnerWidth 9 | John Sheehan (@johnsheehan) 10 | Get the current computed inner width for the first element in the set of matched elements, including padding but not border. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqInnerWidth 13 |
14 | 15 | 16 | 17 | selector 18 | Element to select 19 | selector 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqInsertAfter.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqInsertAfter 9 | John Sheehan (@johnsheehan) 10 | Insert every element in the set of matched elements after the target. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqInsertAfter 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to be modified 19 | selector 20 | 21 | 22 | 23 | 24 | target 25 | A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted after the element(s) specified by this parameter. 26 | target 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqInsertBefore.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqInsertBefore 9 | John Sheehan (@johnsheehan) 10 | Insert every element in the set of matched elements before the target. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqInsertBefore 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to be modified 19 | selector 20 | 21 | 22 | 23 | 24 | target 25 | A selector, element, array of elements, HTML string, or jQuery object; the matched set of elements will be inserted before the element(s) specified by this parameter. 26 | target 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqKeyDown.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqKeyDown 9 | John Sheehan (@johnsheehan) 10 | Bind an event handler to the "keydown" JavaScript event, or trigger that event on an element. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqKeyDown 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | 27 | 28 |
29 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqKeyPress.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqKeyPress 9 | John Sheehan (@johnsheehan) 10 | Bind an event handler to the "keypress" JavaScript event, or trigger that event on an element. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqKeyPress 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | 27 | 28 |
29 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqKeyUp.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqKeyUp 9 | John Sheehan (@johnsheehan) 10 | Bind an event handler to the "keyup" JavaScript event, or trigger that event on an element. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqKeyUp 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | 27 | 28 |
29 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqLoadGet.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqLoadGet 9 | John Sheehan (@johnsheehan) 10 | Load data from the server and place the returned HTML into the matched element. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqLoadGet 13 |
14 | 15 | 16 | 17 | selector 18 | Element to select 19 | selector 20 | 21 | 22 | 23 | 24 | url 25 | A string containing the URL to which the request is sent. 26 | /url 27 | 28 | 29 | 30 | 31 | data 32 | A string that is sent to the server with the request. 33 | name=value&name2=value2 34 | 35 | 36 | 37 | 38 | 42 | 43 |
44 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqLoadPost.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqLoadPost 9 | John Sheehan (@johnsheehan) 10 | Load data from the server and place the returned HTML into the matched element. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqLoadPost 13 |
14 | 15 | 16 | 17 | selector 18 | Element to select 19 | selector 20 | 21 | 22 | 23 | 24 | url 25 | A string containing the URL to which the request is sent. 26 | /url 27 | 28 | 29 | 30 | 31 | data 32 | A plain object that is sent to the server with the request. 33 | { name: value, name2: value2 } 34 | 35 | 36 | 37 | 38 | 42 | 43 |
44 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqMap.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqMap 9 | Graham Charles 10 | Translate all items in an array or object to new array of items. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqMap 13 |
14 | 15 | 16 | 17 | arrayOrObject 18 | The Array or Object to translate. 19 | arrayOrObject 20 | 21 | 22 | 23 | 24 | 27 | 28 |
29 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqMouseDown.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqMouseDown 9 | John Sheehan (@johnsheehan) 10 | Bind an event handler to the "mousedown" JavaScript event, or trigger that event on an element. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqMouseDown 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | 27 | 28 |
29 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqMouseEnter.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqMouseEnter 9 | John Sheehan (@johnsheehan) 10 | Bind an event handler to be fired when the mouse enters an element, or trigger that handler on an element. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqMouseEnter 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | 27 | 28 |
29 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqMouseLeave.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqMouseLeave 9 | John Sheehan (@johnsheehan) 10 | Bind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqMouseLeave 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | 27 | 28 |
29 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqMouseMove.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqMouseMove 9 | John Sheehan (@johnsheehan) 10 | Bind an event handler to the "mousemove" JavaScript event, or trigger that event on an element. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqMouseMove 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | 28 | 29 |
30 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqMouseOut.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqMouseOut 9 | John Sheehan (@johnsheehan) 10 | Bind an event handler to the "mouseout" JavaScript event, or trigger that event on an element. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqMouseOut 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | 27 | 28 |
29 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqMouseOver.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqMouseOver 9 | John Sheehan (@johnsheehan) 10 | Bind an event handler to the "mouseover" JavaScript event, or trigger that event on an element. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqMouseOver 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | 27 | 28 |
29 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqMouseUp.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqMouseUp 9 | John Sheehan (@johnsheehan) 10 | Bind an event handler to the "mouseup" JavaScript event, or trigger that event on an element. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqMouseUp 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | 27 | 28 |
29 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqNamespace.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqNamespace 9 | Brad Turner 10 | A namespace template. ref: http://enterprisejquery.com/2010/10/how-good-c-habits-can-encourage-bad-javascript-habits-part-1/ 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqNamespace 13 |
14 | 15 | 16 | 17 | name 18 | The namespace declaration 19 | myNamespace 20 | 21 | 22 | 23 | 24 | 41 | 42 |
43 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqOff.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqOff 9 | Caleb Everett (github.com/everettcaleb) 10 | Detach an event handler from one or more events on the selected elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqOff 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | events 25 | One or more space-separated event types or namespaces, such as "click", "keydown.myPlugin", or ".myPlugin". 26 | events 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqOffSel.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqOffSel 9 | Caleb Everett (github.com/everettcaleb) 10 | Detach an event handler from one or more events on the document with the specified selector. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqOffSel 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | events 25 | One or more space-separated event types or namespaces, such as "click", "keydown.myPlugin", or ".myPlugin". 26 | events 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqOffsetGet.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqOffsetGet 9 | John Sheehan (@johnsheehan) 10 | Get the current coordinates of the first element, or set the coordinates of every element, in the set of matched elements, relative to the document. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqOffsetGet 13 |
14 | 15 | 16 | 17 | selector 18 | Element to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | 28 | 29 |
30 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqOffsetParent.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqOffsetParent 9 | John Sheehan (@johnsheehan) 10 | Get the closest ancestor element that is positioned. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqOffsetParent 13 |
14 | 15 | 16 | 17 | selector 18 | Element to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | 28 | 29 |
30 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqOn.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqOn 9 | Kyle Spearrin (www.kylespearrin.com) 10 | Attach an event handler function for one or more events to the selected elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqOn 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | events 25 | One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". 26 | events 27 | 28 | 29 | 30 | 31 | 34 | 35 |
36 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqOnSel.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqOnSel 9 | Caleb Everett (github.com/everettcaleb) 10 | Attach an event handler function for one or more events to the document filtered by the selector. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqOnSel 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | events 25 | One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". 26 | events 27 | 28 | 29 | 30 | 31 | 34 | 35 |
36 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqOne.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqOne 9 | John Sheehan (@johnsheehan) 10 | Attach a handler to an event for the elements. The handler is executed at most once per element per event type. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqOne 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | events 25 | A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names. 26 | events 27 | 28 | 29 | 30 | 31 | 34 | 35 |
36 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqOneWithData.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqOneWithData 9 | John Sheehan (@johnsheehan) 10 | Attach a handler to an event for the elements. The handler is executed at most once per element per event type. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqOneWithData 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | events 25 | A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names. 26 | events 27 | 28 | 29 | 30 | 31 | data 32 | An object containing data that will be passed to the event handler. 33 | { name: "value" } 34 | 35 | 36 | 37 | 38 | 41 | 42 |
43 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqOuterHeight.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqOuterHeight 9 | John Sheehan (@johnsheehan) 10 | Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin. Returns a number (without "px") representation of the value or null if called on an empty set of elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqOuterHeight 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | includeMargin 25 | A Boolean indicating whether to include the element's margin in the calculation. 26 | includeMargin 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqOuterWidth.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqOuterWidth 9 | John Sheehan (@johnsheehan) 10 | Get the current computed width for the first element in the set of matched elements, including padding and border. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqOuterWidth 13 |
14 | 15 | 16 | 17 | selector 18 | jQuery selector 19 | selector 20 | 21 | 22 | 23 | 24 | includeMargin 25 | A Boolean indicating whether to include the element's margin in the calculation. 26 | includeMargin 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqPlugin.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqPlugin 9 | John Sheehan (@johnsheehan) 10 | Plugin template. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqPlugin 13 |
14 | 15 | 16 | 17 | pluginName 18 | Name of the plugin to create 19 | myPlugin 20 | 21 | 22 | 23 | 24 | 38 | 39 |
40 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqPosition.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqPosition 9 | John Sheehan (@johnsheehan) 10 | Get the current coordinates of the first element in the set of matched elements, relative to the offset parent. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqPosition 13 |
14 | 15 | 16 | 17 | selector 18 | Element to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | 28 | 29 |
30 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqPost.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqPost 9 | John Sheehan (@johnsheehan) 10 | Load data from the server using a HTTP POST request. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqPost 13 |
14 | 15 | 16 | 17 | url 18 | A string containing the URL to which the request is sent. 19 | /url 20 | 21 | 22 | 23 | 24 | data 25 | A plain object or string that is sent to the server with the request. 26 | { name: "value" } 27 | 28 | 29 | 30 | 31 | dataType 32 | The type of data expected from the server. Default: Intelligent Guess (xml, json, script, text, html). 33 | dataType 34 | 35 | 36 | 37 | 38 | 44 | 45 |
46 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqPrepend.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqPrepend 9 | John Sheehan (@johnsheehan) 10 | Insert content, specified by the parameter, to the beginning of each element in the set of matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqPrepend 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to be modified 19 | selector 20 | 21 | 22 | 23 | 24 | content 25 | DOM element, array of elements, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements. 26 | content 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqPrependTo.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqPrependTo 9 | John Sheehan (@johnsheehan) 10 | Insert every element in the set of matched elements to the beginning of the target. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqPrependTo 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to be modified 19 | selector 20 | 21 | 22 | 23 | 24 | content 25 | DOM element, array of elements, HTML string, or jQuery object to insert at the beginning of each element in the set of matched elements. 26 | content 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqRemove.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqRemove 9 | John Sheehan (@johnsheehan) 10 | Remove the set of matched elements from the DOM. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqRemove 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to be removed 19 | selector 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqRemoveExp.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqRemoveExp 9 | John Sheehan (@johnsheehan) 10 | Remove the set of matched elements from the DOM. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqRemoveExp 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to be removed 19 | selector 20 | 21 | 22 | 23 | 24 | expression 25 | A selector expression that filters the set of matched elements to be removed. 26 | expression 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqReplaceAll.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqReplaceAll 9 | John Sheehan (@johnsheehan) 10 | Replace each target element with the set of matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqReplaceAll 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to be modified 19 | selector 20 | 21 | 22 | 23 | 24 | target 25 | A selector string, jQuery object, DOM element, or array of elements indicating which element(s) to replace. 26 | target 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqReplaceWith.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqReplaceWith 9 | John Sheehan (@johnsheehan) 10 | Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqReplaceWith 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to be modified 19 | selector 20 | 21 | 22 | 23 | 24 | newContent 25 | The content to insert. May be an HTML string, DOM element, array of DOM elements, or jQuery object. 26 | newContent 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqResize.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqResize 9 | John Sheehan (@johnsheehan) 10 | Bind an event handler to the "resize" JavaScript event, or trigger that event on an element. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqResize 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | 27 | 28 |
29 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqScroll.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqScroll 9 | John Sheehan (@johnsheehan) 10 | Bind an event handler to the "scroll" JavaScript event, or trigger that event on an element. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqScroll 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | 27 | 28 |
29 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqScrollLeftGet.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqScrollLeftGet 9 | John Sheehan (@johnsheehan) 10 | Get the current horizontal position of the scroll bar for the first element in the set of matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqScrollLeftGet 13 |
14 | 15 | 16 | 17 | selector 18 | Element to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqScrollLeftSet.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqScrollLeftSet 9 | John Sheehan (@johnsheehan) 10 | Set the current horizontal position of the scroll bar for each of the set of matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqScrollLeftSet 13 |
14 | 15 | 16 | 17 | selector 18 | Element to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | value 25 | An integer indicating the new position to set the scroll bar to. 26 | value 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqScrollTopGet.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqScrollTopGet 9 | John Sheehan (@johnsheehan) 10 | Get the current vertical position of the scroll bar for the first element in the set of matched elements or set the vertical position of the scroll bar for every matched element. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqScrollTopGet 13 |
14 | 15 | 16 | 17 | selector 18 | Element to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqScrollTopSet.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqScrollTopSet 9 | John Sheehan (@johnsheehan) 10 | Set the current vertical position of the scroll bar for each of the set of matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqScrollTopSet 13 |
14 | 15 | 16 | 17 | selector 18 | Element to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | value 25 | An integer indicating the new position to set the scroll bar to. 26 | value 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqSelect.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqSelect 9 | John Sheehan (@johnsheehan) 10 | Bind an event handler to the "select" JavaScript event, or trigger that event on an element. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqSelect 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | 27 | 28 |
29 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqSelectTrigger.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqSelectTrigger 9 | John Sheehan (@johnsheehan) 10 | Bind an event handler to the "select" JavaScript event, or trigger that event on an element. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqSelectTrigger 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqShow.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqShow 9 | John Sheehan (@johnsheehan) 10 | Display the matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqShow 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqShowFull.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqShowFull 9 | John Sheehan (@johnsheehan) 10 | Display the matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqShowFull 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | duration 25 | A string or number determining how long the animation will run. 26 | duration 27 | 28 | 29 | 30 | 31 | 34 | 35 |
36 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqSlideDown.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqSlideDown 9 | John Sheehan (@johnsheehan) 10 | Display the matched elements with a sliding motion. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqSlideDown 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqSlideDownFull.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqSlideDownFull 9 | John Sheehan (@johnsheehan) 10 | Display the matched elements with a sliding motion. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqSlideDownFull 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | duration 25 | A string or number determining how long the animation will run. 26 | duration 27 | 28 | 29 | 30 | 31 | 34 | 35 |
36 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqSlideToggle.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqSlideToggle 9 | Kyle Spearrin (www.kylespearrin.com) 10 | Display or hide the matched elements with a sliding motion. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqSlideToggle 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqSlideToggleFull.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqSlideToggleFull 9 | Kyle Spearrin (www.kylespearrin.com) 10 | Display or hide the matched elements with a sliding motion. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqSlideToggleFull 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | duration 25 | A string or number determining how long the animation will run. 26 | duration 27 | 28 | 29 | 30 | 31 | 34 | 35 |
36 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqSlideUp.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqSlideUp 9 | John Sheehan (@johnsheehan) 10 | Display the matched elements with a sliding motion. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqSlideUp 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqSlideUpFull.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqSlideUpFull 9 | John Sheehan (@johnsheehan) 10 | Display the matched elements with a sliding motion. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqSlideUpFull 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | duration 25 | A string or number determining how long the animation will run. 26 | duration 27 | 28 | 29 | 30 | 31 | 34 | 35 |
36 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqSubmit.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqSubmit 9 | John Sheehan (@johnsheehan) 10 | Bind an event handler to the "submit" JavaScript event, or trigger that event on an element. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqSubmit 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | 28 | 29 |
30 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqSubmitTrigger.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqSubmitTrigger 9 | John Sheehan (@johnsheehan) 10 | Bind an event handler to the "submit" JavaScript event, or trigger that event on an element. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqSubmitTrigger 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqTextGet.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqTextGet 9 | John Sheehan (@johnsheehan) 10 | Get the combined text contents of each element in the set of matched elements, including their descendants. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqTextGet 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to be retrieved 19 | selector 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqTextSet.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqTextSet 9 | John Sheehan (@johnsheehan) 10 | Set the content of each element in the set of matched elements to the specified text. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqTextSet 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to be modified 19 | selector 20 | 21 | 22 | 23 | 24 | textString 25 | A string of text to set as the content of each matched element. 26 | textString 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqToggle.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqToggle 9 | John Sheehan (@johnsheehan) 10 | Display or hide the matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqToggle 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqToggleFull.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqToggleFull 9 | John Sheehan (@johnsheehan) 10 | Display or hide the matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqToggleFull 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | duration 25 | A string or number determining how long the animation will run. 26 | duration 27 | 28 | 29 | 30 | 31 | 34 | 35 |
36 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqToggleSwitch.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqToggleSwitch 9 | John Sheehan (@johnsheehan) 10 | Display or hide the matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqToggleSwitch 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | showOrHide 25 | A Boolean indicating whether to show or hide the elements. 26 | showOrHide 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqTrigger.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqTrigger 9 | John Sheehan (@johnsheehan) 10 | Execute all handlers and behaviors attached to the matched elements for the given event type. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqTrigger 13 |
14 | 15 | 16 | 17 | eventType 18 | A string containing a JavaScript event type, such as click or submit. 19 | eventType 20 | 21 | 22 | 23 | 24 | selector 25 | Element(s) to bind to 26 | selector 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqTriggerHandler.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqTriggerHandler 9 | John Sheehan (@johnsheehan) 10 | Execute all handlers attached to an element for an event. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqTriggerHandler 13 |
14 | 15 | 16 | 17 | eventType 18 | A string containing a JavaScript event type, such as click or submit. 19 | eventType 20 | 21 | 22 | 23 | 24 | selector 25 | Element(s) to bind to 26 | selector 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqTriggerHandlerWithData.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqTriggerHandlerWithData 9 | John Sheehan (@johnsheehan) 10 | Execute all handlers attached to an element for an event. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqTriggerHandlerWithData 13 |
14 | 15 | 16 | 17 | eventType 18 | A string containing a JavaScript event type, such as click or submit. 19 | eventType 20 | 21 | 22 | 23 | 24 | name 25 | Parameter name 26 | name 27 | 28 | 29 | 30 | 31 | value 32 | Parameter value 33 | value 34 | 35 | 36 | 37 | 38 | selector 39 | Element(s) to bind to 40 | selector 41 | 42 | 43 | 44 | 45 | 46 | 47 |
48 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqTriggerWithData.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqTriggerWithData 9 | John Sheehan (@johnsheehan) 10 | Execute all handlers and behaviors attached to the matched elements for the given event type. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqTriggerWithData 13 |
14 | 15 | 16 | 17 | eventType 18 | A string containing a JavaScript event type, such as click or submit. 19 | eventType 20 | 21 | 22 | 23 | 24 | name 25 | Parameter name 26 | name 27 | 28 | 29 | 30 | 31 | value 32 | Parameter value 33 | value 34 | 35 | 36 | 37 | 38 | selector 39 | Element(s) to bind to 40 | selector 41 | 42 | 43 | 44 | 45 | 46 | 47 |
48 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqUnbind.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqUnbind 9 | John Sheehan (@johnsheehan) 10 | Remove a previously-attached event handler from the elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqUnbind 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to unbind 19 | selector 20 | 21 | 22 | 23 | 24 | eventType 25 | A string containing a JavaScript event type, such as click or submit. 26 | eventType 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqUnbindAll.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqUnbindAll 9 | John Sheehan (@johnsheehan) 10 | Remove a previously-attached event handler from the elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqUnbindAll 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to unbind 19 | selector 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqUnload.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqUnload 9 | John Sheehan (@johnsheehan) 10 | Bind an event handler to the "unload" JavaScript event. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqUnload 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | 27 | 28 |
29 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqValGet.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqValGet 9 | John Sheehan (@johnsheehan) 10 | Get the current value of the first element in the set of matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqValGet 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to be retrieved 19 | selector 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqValSet.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqValSet 9 | John Sheehan (@johnsheehan) 10 | Set the value of each element in the set of matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqValSet 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to be modified 19 | selector 20 | 21 | 22 | 23 | 24 | value 25 | A string of text or an array of strings corresponding to the value of each matched element to set as selected/checked. 26 | value 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqWidthGet.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqWidthGet 9 | John Sheehan (@johnsheehan) 10 | Get the current computed width for the first element in the set of matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqWidthGet 13 |
14 | 15 | 16 | 17 | selector 18 | Element to bind to 19 | selector 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqWidthSet.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqWidthSet 9 | John Sheehan (@johnsheehan) 10 | Set the CSS width of each element in the set of matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqWidthSet 13 |
14 | 15 | 16 | 17 | selector 18 | jQuery selector 19 | selector 20 | 21 | 22 | 23 | 24 | value 25 | An integer representing the number of pixels, or an integer along with an optional unit of measure appended (as a string). 26 | value 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqWrap.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqWrap 9 | John Sheehan (@johnsheehan) 10 | Wrap an HTML structure around each element in the set of matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqWrap 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to be modified 19 | selector 20 | 21 | 22 | 23 | 24 | wrappingElement 25 | A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements. 26 | div 27 | 28 | 29 | 30 | 31 | ");$end$]]> 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqWrapAll.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqWrapAll 9 | John Sheehan (@johnsheehan) 10 | Wrap an HTML structure around all elements in the set of matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqWrapAll 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to be modified 19 | selector 20 | 21 | 22 | 23 | 24 | wrappingElement 25 | A selector, element, HTML string, or jQuery object specifying the structure to wrap around the matched elements. 26 | div 27 | 28 | 29 | 30 | 31 | ");$end$]]> 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/JavaScript/jQuery/jqWrapInner.snippet: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
5 | 6 | Expansion 7 | 8 | jqWrapInner 9 | John Sheehan (@johnsheehan) 10 | Wrap an HTML structure around the content of each element in the set of matched elements. 11 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 12 | jqWrapInner 13 |
14 | 15 | 16 | 17 | selector 18 | Element(s) to be modified 19 | selector 20 | 21 | 22 | 23 | 24 | wrappingElement 25 | An HTML snippet, selector expression, jQuery object, or DOM element specifying the structure to wrap around the content of the matched elements. 26 | div 27 | 28 | 29 | 30 | 31 | ");$end$]]> 32 | 33 |
34 |
-------------------------------------------------------------------------------- /jQueryCodeSnippets/preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kspearrin/Visual-Studio-jQuery-Code-Snippets/1f11f6e461d2fbfee6fce357344ad0d63aaba837/jQueryCodeSnippets/preview.png -------------------------------------------------------------------------------- /jQueryCodeSnippets/registry.pkgdef: -------------------------------------------------------------------------------- 1 |  2 | // JavaScript 3 | [$RootKey$\Languages\CodeExpansions\JavaScript\Paths] 4 | "jQuery"="$PackageFolder$\\JavaScript\\jQuery" 5 | 6 | // HTML 7 | [$RootKey$\Languages\CodeExpansions\HTML\Paths] 8 | "jQuery"="$PackageFolder$\\HTML\\jQuery" -------------------------------------------------------------------------------- /jQueryCodeSnippets/source.extension.vsixmanifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | jQuery Code Snippets 6 | 130+ jQuery code snippets for Visual Studio 2012-2019. 7 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 8 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets 9 | https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets/wiki/Release-Notes 10 | preview.png 11 | preview.png 12 | jquery, snippet, snippets, code snippets 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jQuery-Code-Snippets", 3 | "version": "1.5.0", 4 | "description": "130+ jQuery code snippets for Visual Studio 2012, 2013, & 2015.", 5 | "homepage": "https://visualstudiogallery.msdn.microsoft.com/577b9c03-71fb-417b-bcbb-94b6d3d326b8", 6 | "author": "Kyle Spearrin", 7 | "license": "MIT", 8 | "repository": { 9 | "type": "git", 10 | "url": "https://github.com/kspearrin/Visual-Studio-jQuery-Code-Snippets" 11 | }, 12 | "dependencies": { 13 | "gulp": "^3.9.0", 14 | "gulp-flatten": "0.0.4", 15 | "gulp-msbuild": "^0.2.11", 16 | "gulp-xmlpoke": "^0.2.0", 17 | "gulp-xunit-runner": "^0.1.1", 18 | "nuget-runner": "^0.1.5" 19 | } 20 | } 21 | --------------------------------------------------------------------------------