Skip to content

Commit b4f7f61

Browse files
committed
Refactoring snippets with better titles, descriptions, and tooltips from jquery 1.11.0 docs.
Uniform formatting throughout.
1 parent f9d0eb4 commit b4f7f61

18 files changed

+243
-178
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1+
<?xml version="1.0" encoding="utf-8"?>
12
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
23
<CodeSnippet Format="1.4.0">
34
<Header>
45
<SnippetTypes>
56
<SnippetType>Expansion</SnippetType>
67
</SnippetTypes>
7-
<Title>jQuery: script tag and $(document).ready() shortcut</Title>
8+
<Title>jq</Title>
89
<Author>John Sheehan (@johnsheehan)</Author>
9-
<HelpUrl>https://github.com/xxkylexx/Visual-Studio-jQuery-Code-Snippets</HelpUrl>
10+
<Description>A script tag with a $(document).ready() shortcut.</Description>
11+
<HelpUrl>https://github.com/xxkylexx/Visual-Studio-jQuery-Code-Snippets</HelpUrl>
1012
<Shortcut>jq</Shortcut>
1113
</Header>
1214
<Snippet>
13-
<Code Language="html">
14-
<![CDATA[<script type="text/javascript">
15+
<Code Language="html"><![CDATA[<script type="text/javascript">
1516
$$(function() {
1617
$end$
1718
});
18-
</script>]]>
19-
</Code>
19+
</script>]]></Code>
2020
</Snippet>
2121
</CodeSnippet>
2222
</CodeSnippets>
Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
1+
<?xml version="1.0" encoding="utf-8"?>
12
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
23
<CodeSnippet Format="1.4.0">
34
<Header>
45
<SnippetTypes>
56
<SnippetType>Expansion</SnippetType>
67
</SnippetTypes>
7-
<Title>jQuery: script tag with jQuery src</Title>
8+
<Title>jqScript</Title>
89
<Author>John Sheehan (@johnsheehan)</Author>
9-
<HelpUrl>https://github.com/xxkylexx/Visual-Studio-jQuery-Code-Snippets</HelpUrl>
10+
<Description>A script tag with a jQuery src.</Description>
11+
<HelpUrl>https://github.com/xxkylexx/Visual-Studio-jQuery-Code-Snippets</HelpUrl>
1012
<Shortcut>jqScript</Shortcut>
1113
</Header>
1214
<Snippet>
1315
<Declarations>
14-
<Literal>
16+
<Literal Editable="true">
1517
<ID>path</ID>
1618
<ToolTip>Path to jQuery script</ToolTip>
17-
<Default>/Scripts/jquery-1.9.0.min.js</Default>
19+
<Default>/scripts/jquery-1.9.0.min.js</Default>
20+
<Function>
21+
</Function>
1822
</Literal>
1923
</Declarations>
20-
<Code Language="html">
21-
<![CDATA[<script type="text/javascript" src="$path$"></script>
22-
$end$]]>
23-
</Code>
24+
<Code Language="html"><![CDATA[<script type="text/javascript" src="$path$"></script>
25+
$end$]]></Code>
2426
</Snippet>
2527
</CodeSnippet>
2628
</CodeSnippets>
Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
1+
<?xml version="1.0" encoding="utf-8"?>
12
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
23
<CodeSnippet Format="1.4.0">
34
<Header>
45
<SnippetTypes>
56
<SnippetType>Expansion</SnippetType>
67
</SnippetTypes>
7-
<Title>jQuery: script tag using Google's CDN</Title>
8+
<Title>jqScriptCdnGoogle</Title>
89
<Author>John Sheehan (@johnsheehan)</Author>
9-
<HelpUrl>https://github.com/xxkylexx/Visual-Studio-jQuery-Code-Snippets</HelpUrl>
10+
<Description>A script tag with a jQuery src using Google's CDN.</Description>
11+
<HelpUrl>https://github.com/xxkylexx/Visual-Studio-jQuery-Code-Snippets</HelpUrl>
1012
<Shortcut>jqScriptCdnGoogle</Shortcut>
1113
</Header>
1214
<Snippet>
13-
<Declarations>
14-
<Literal>
15+
<Declarations>
16+
<Literal Editable="true">
1517
<ID>version</ID>
1618
<ToolTip>Library version number</ToolTip>
17-
<Default>1.9.0</Default>
19+
<Default>1.11.0</Default>
20+
<Function>
21+
</Function>
1822
</Literal>
1923
</Declarations>
20-
<Code Language="html">
21-
<![CDATA[<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/$version$/jquery.min.js"></script>
22-
$end$]]>
23-
</Code>
24+
<Code Language="html"><![CDATA[<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/$version$/jquery.min.js"></script>
25+
$end$]]></Code>
2426
</Snippet>
2527
</CodeSnippet>
2628
</CodeSnippets>
Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
1+
<?xml version="1.0" encoding="utf-8"?>
12
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
23
<CodeSnippet Format="1.4.0">
34
<Header>
45
<SnippetTypes>
56
<SnippetType>Expansion</SnippetType>
67
</SnippetTypes>
7-
<Title>jQuery: script tag using Microsoft's CDN</Title>
8+
<Title>jqScriptCdnMs</Title>
89
<Author>John Sheehan (@johnsheehan)</Author>
9-
<HelpUrl>https://github.com/xxkylexx/Visual-Studio-jQuery-Code-Snippets</HelpUrl>
10+
<Description>A script tag with a jQuery src using Microsoft's CDN.</Description>
11+
<HelpUrl>https://github.com/xxkylexx/Visual-Studio-jQuery-Code-Snippets</HelpUrl>
1012
<Shortcut>jqScriptCdnMs</Shortcut>
1113
</Header>
1214
<Snippet>
13-
<Declarations>
14-
<Literal>
15+
<Declarations>
16+
<Literal Editable="true">
1517
<ID>version</ID>
1618
<ToolTip>Library version number</ToolTip>
17-
<Default>1.9.0</Default>
19+
<Default>1.11.0</Default>
20+
<Function>
21+
</Function>
1822
</Literal>
1923
</Declarations>
20-
<Code Language="html">
21-
<![CDATA[<script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-$version$.min.js"></script>
22-
$end]]>
23-
</Code>
24+
<Code Language="html"><![CDATA[<script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-$version$.min.js"></script>
25+
$end]]></Code>
2426
</Snippet>
2527
</CodeSnippet>
2628
</CodeSnippets>
Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
1+
<?xml version="1.0" encoding="utf-8"?>
12
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
23
<CodeSnippet Format="1.4.0">
34
<Header>
45
<SnippetTypes>
56
<SnippetType>Expansion</SnippetType>
67
</SnippetTypes>
7-
<Title>jQuery: script tag and $(document).ready() shortcut</Title>
8+
<Title>jqScriptMin</Title>
89
<Author>John Sheehan (@johnsheehan)</Author>
9-
<HelpUrl>https://github.com/xxkylexx/Visual-Studio-jQuery-Code-Snippets</HelpUrl>
10+
<Description>A script tag with a jQuery src and a $(document).ready() shortcut.</Description>
11+
<HelpUrl>https://github.com/xxkylexx/Visual-Studio-jQuery-Code-Snippets</HelpUrl>
1012
<Shortcut>jqScriptMin</Shortcut>
1113
</Header>
1214
<Snippet>
1315
<Declarations>
14-
<Literal>
16+
<Literal Editable="true">
1517
<ID>path</ID>
1618
<ToolTip>Path to jQuery script</ToolTip>
17-
<Default>/Scripts/jquery-1.9.0.min.js</Default>
19+
<Default>/scripts/jquery-1.9.0.min.js</Default>
20+
<Function>
21+
</Function>
1822
</Literal>
1923
</Declarations>
20-
<Code Language="html">
21-
<![CDATA[<script type="text/javascript" src="$path$">
24+
<Code Language="html"><![CDATA[<script type="text/javascript" src="$path$">
2225
$$(function() {
2326
$end$
2427
});
25-
</script>]]>
26-
</Code>
28+
</script>]]></Code>
2729
</Snippet>
2830
</CodeSnippet>
2931
</CodeSnippets>
Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
1+
<?xml version="1.0" encoding="utf-8"?>
12
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
23
<CodeSnippet Format="1.4.0">
34
<Header>
45
<SnippetTypes>
56
<SnippetType>Expansion</SnippetType>
67
</SnippetTypes>
7-
<Title>jQuery: script tag for jQuery UI using Google's CDN</Title>
8+
<Title>jqScriptUiCdnGoogle</Title>
89
<Author>John Sheehan (@johnsheehan)</Author>
9-
<HelpUrl>https://github.com/xxkylexx/Visual-Studio-jQuery-Code-Snippets</HelpUrl>
10+
<Description>A script tag with a jQuery UI src using Google's CDN.</Description>
11+
<HelpUrl>https://github.com/xxkylexx/Visual-Studio-jQuery-Code-Snippets</HelpUrl>
1012
<Shortcut>jqScriptUiCdnGoogle</Shortcut>
1113
</Header>
1214
<Snippet>
13-
<Declarations>
14-
<Literal>
15+
<Declarations>
16+
<Literal Editable="true">
1517
<ID>version</ID>
1618
<ToolTip>Library version number</ToolTip>
17-
<Default>1.10.0</Default>
19+
<Default>1.10.4</Default>
20+
<Function>
21+
</Function>
1822
</Literal>
1923
</Declarations>
20-
<Code Language="html">
21-
<![CDATA[<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/$version$/jquery-ui.min.js"></script>
22-
$end$]]>
23-
</Code>
24+
<Code Language="html"><![CDATA[<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/$version$/jquery-ui.min.js"></script>
25+
$end$]]></Code>
2426
</Snippet>
2527
</CodeSnippet>
2628
</CodeSnippets>
Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
1+
<?xml version="1.0" encoding="utf-8"?>
12
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
23
<CodeSnippet Format="1.4.0">
34
<Header>
45
<SnippetTypes>
56
<SnippetType>Expansion</SnippetType>
67
</SnippetTypes>
7-
<Title>jQuery: script tag for jQuery validation plugin using Microsoft's CDN</Title>
8+
<Title>jqScriptValidateCdnMs</Title>
89
<Author>John Sheehan (@johnsheehan)</Author>
9-
<HelpUrl>https://github.com/xxkylexx/Visual-Studio-jQuery-Code-Snippets</HelpUrl>
10+
<Description>A script tag with a jQuery validation plugin src using Microsoft's CDN.</Description>
11+
<HelpUrl>https://github.com/xxkylexx/Visual-Studio-jQuery-Code-Snippets</HelpUrl>
1012
<Shortcut>jqScriptValidateCdnMs</Shortcut>
1113
</Header>
1214
<Snippet>
13-
<Declarations>
14-
<Literal>
15+
<Declarations>
16+
<Literal Editable="true">
1517
<ID>version</ID>
1618
<ToolTip>Library version number</ToolTip>
17-
<Default>1.10.0</Default>
19+
<Default>1.11.1</Default>
20+
<Function>
21+
</Function>
1822
</Literal>
1923
</Declarations>
20-
<Code Language="html">
21-
<![CDATA[<script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/jquery.validate/$version$/jquery.validate.min.js"></script>
22-
$end$]]>
23-
</Code>
24+
<Code Language="html"><![CDATA[<script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/jquery.validate/$version$/jquery.validate.min.js"></script>
25+
$end$]]></Code>
2426
</Snippet>
2527
</CodeSnippet>
2628
</CodeSnippets>
Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,28 @@
1+
<?xml version="1.0" encoding="utf-8"?>
12
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
23
<CodeSnippet Format="1.4.0">
34
<Header>
45
<SnippetTypes>
56
<SnippetType>Expansion</SnippetType>
67
</SnippetTypes>
7-
<Title>jQuery: script tag for jQuery unobtrusive validation plugin using Microsoft's CDN</Title>
8+
<Title>jqScriptValidateUnobtrusiveCdnMs</Title>
89
<Author>Kyle Spearrin (www.kylespearrin.com)</Author>
9-
<HelpUrl>https://github.com/xxkylexx/Visual-Studio-jQuery-Code-Snippets</HelpUrl>
10+
<Description>A script tag with a jQuery unobtrusive validation plugin src using Microsoft's CDN</Description>
11+
<HelpUrl>https://github.com/xxkylexx/Visual-Studio-jQuery-Code-Snippets</HelpUrl>
1012
<Shortcut>jqScriptValidateUnobtrusiveCdnMs</Shortcut>
1113
</Header>
1214
<Snippet>
13-
<Code Language="html">
14-
<![CDATA[<script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/mvc/3.0/jquery.validate.unobtrusive.min.js"></script>
15-
$end$]]>
16-
</Code>
15+
<Declarations>
16+
<Literal Editable="true">
17+
<ID>version</ID>
18+
<ToolTip>Library version number</ToolTip>
19+
<Default>4.0</Default>
20+
<Function>
21+
</Function>
22+
</Literal>
23+
</Declarations>
24+
<Code Language="html"><![CDATA[<script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/mvc/$version$/jquery.validate.unobtrusive.min.js"></script>
25+
$end$]]></Code>
1726
</Snippet>
1827
</CodeSnippet>
1928
</CodeSnippets>
Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,28 @@
1+
<?xml version="1.0" encoding="utf-8"?>
12
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
23
<CodeSnippet Format="1.4.0">
34
<Header>
45
<SnippetTypes>
56
<SnippetType>Expansion</SnippetType>
67
</SnippetTypes>
7-
<Title>javascript: anonymous function</Title>
8+
<Title>func</Title>
89
<Author>John Sheehan (@johnsheehan)</Author>
9-
<HelpUrl>https://github.com/xxkylexx/Visual-Studio-jQuery-Code-Snippets</HelpUrl>
10+
<Description>An anonymous function.</Description>
11+
<HelpUrl>https://github.com/xxkylexx/Visual-Studio-jQuery-Code-Snippets</HelpUrl>
1012
<Shortcut>func</Shortcut>
1113
</Header>
1214
<Snippet>
13-
<Code Language="JavaScript">
14-
<![CDATA[function () { $end$ }]]>
15-
</Code>
15+
<Declarations>
16+
<Literal Editable="true">
17+
<ID>param</ID>
18+
<ToolTip>Parameter</ToolTip>
19+
<Default>
20+
</Default>
21+
<Function>
22+
</Function>
23+
</Literal>
24+
</Declarations>
25+
<Code Language="javascript"><![CDATA[function ($param$) { $end$ }]]></Code>
1626
</Snippet>
1727
</CodeSnippet>
18-
1928
</CodeSnippets>
Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,34 @@
1+
<?xml version="1.0" encoding="utf-8"?>
12
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
23
<CodeSnippet Format="1.4.0">
34
<Header>
45
<SnippetTypes>
56
<SnippetType>Expansion</SnippetType>
67
</SnippetTypes>
7-
<Title>jQuery: Insert content after each of the matched elements.</Title>
8+
<Title>jqAfter</Title>
89
<Author>John Sheehan (@johnsheehan)</Author>
9-
<Shortcut>jqAfter</Shortcut>
10+
<Description>Insert content, specified by the parameter, after each element in the set of matched elements.</Description>
1011
<HelpUrl>https://github.com/xxkylexx/Visual-Studio-jQuery-Code-Snippets</HelpUrl>
12+
<Shortcut>jqAfter</Shortcut>
1113
</Header>
1214
<Snippet>
1315
<Declarations>
14-
<Literal>
16+
<Literal Editable="true">
1517
<ID>selector</ID>
1618
<ToolTip>Element(s) to be modified</ToolTip>
1719
<Default>selector</Default>
20+
<Function>
21+
</Function>
1822
</Literal>
19-
<Literal>
23+
<Literal Editable="true">
2024
<ID>content</ID>
21-
<ToolTip>Content to be inserted</ToolTip>
25+
<ToolTip>HTML string, DOM element, array of elements, or jQuery object to insert after each element in the set of matched elements.</ToolTip>
2226
<Default>content</Default>
27+
<Function>
28+
</Function>
2329
</Literal>
2430
</Declarations>
25-
<Code Language="JavaScript">
26-
<![CDATA[$$($selector$).after($content$);
27-
$end$]]>
28-
</Code>
31+
<Code Language="javascript"><![CDATA[$$($selector$).after($content$);$end$]]></Code>
2932
</Snippet>
3033
</CodeSnippet>
31-
</CodeSnippets>
32-
34+
</CodeSnippets>

0 commit comments

Comments
 (0)