Permalink
Browse files

fixed most jquery snippets

Signed-off-by: Martin Grenfell <martin_grenfell@msn.com>
  • Loading branch information...
1 parent 9bd74e2 commit 9e7789e116f5440dab484b57d6e51fcfd4a88405 Reza Jelveh committed with Feb 19, 2009
Showing with 183 additions and 184 deletions.
  1. +1 −1 javascript-jquery/add.snippet
  2. +1 −1 javascript-jquery/addClass.snippet
  3. +1 −1 javascript-jquery/after.snippet
  4. +13 −13 javascript-jquery/ajax.snippet
  5. +3 −3 javascript-jquery/ajaxerror.snippet
  6. +3 −3 javascript-jquery/ajaxget.snippet
  7. +2 −2 javascript-jquery/ajaxgetif.snippet
  8. +3 −3 javascript-jquery/ajaxsend.snippet
  9. +13 −13 javascript-jquery/ajaxsetup.snippet
  10. +2 −2 javascript-jquery/ajaxstart.snippet
  11. +2 −2 javascript-jquery/ajaxstop.snippet
  12. +2 −2 javascript-jquery/ajaxsuccess.snippet
  13. +1 −1 javascript-jquery/animate.snippet
  14. +1 −1 javascript-jquery/append.snippet
  15. +1 −1 javascript-jquery/appendTo.snippet
  16. +1 −1 javascript-jquery/before.snippet
  17. +3 −3 javascript-jquery/bind.snippet
  18. +3 −3 javascript-jquery/blur.snippet
  19. +3 −3 javascript-jquery/change.snippet
  20. +1 −1 javascript-jquery/children.snippet
  21. +3 −3 javascript-jquery/click.snippet
  22. +1 −1 javascript-jquery/clone.snippet
  23. +1 −1 javascript-jquery/contains.snippet
  24. +1 −1 javascript-jquery/css.snippet
  25. +1 −1 javascript-jquery/cssm.snippet
  26. +3 −3 javascript-jquery/dblclick.snippet
  27. +3 −3 javascript-jquery/each.snippet
  28. +1 −1 javascript-jquery/el.snippet
  29. +1 −1 javascript-jquery/eltrim.snippet
  30. +1 −1 javascript-jquery/end.snippet
  31. +3 −3 javascript-jquery/error.snippet
  32. +1 −1 javascript-jquery/fadein.snippet
  33. +2 −2 javascript-jquery/fadeinc.snippet
  34. +1 −1 javascript-jquery/fadeout.snippet
  35. +2 −2 javascript-jquery/fadeoutc.snippet
  36. +1 −1 javascript-jquery/fadeto.snippet
  37. +2 −2 javascript-jquery/fadetoc.snippet
  38. +1 −1 javascript-jquery/filter.snippet
  39. +1 −1 javascript-jquery/find.snippet
  40. +3 −3 javascript-jquery/focus.snippet
  41. +1 −1 javascript-jquery/get.snippet
  42. +2 −2 javascript-jquery/getscript.snippet
  43. +1 −1 javascript-jquery/height.snippet
  44. +1 −1 javascript-jquery/hide.snippet
  45. +2 −2 javascript-jquery/hidec.snippet
  46. +4 −4 javascript-jquery/hover.snippet
  47. +1 −1 javascript-jquery/html.snippet
  48. +1 −1 javascript-jquery/insertAfter.snippet
  49. +1 −1 javascript-jquery/insertBefore.snippet
  50. +1 −1 javascript-jquery/is.snippet
  51. +3 −3 javascript-jquery/load.snippet
  52. +3 −3 javascript-jquery/mdown.snippet
  53. +3 −3 javascript-jquery/mmove.snippet
  54. +3 −3 javascript-jquery/mout.snippet
  55. +3 −3 javascript-jquery/mover.snippet
  56. +3 −3 javascript-jquery/mup.snippet
  57. +1 −1 javascript-jquery/next.snippet
  58. +1 −1 javascript-jquery/not.snippet
  59. +3 −3 javascript-jquery/one.snippet
  60. +1 −1 javascript-jquery/parent.snippet
  61. +1 −1 javascript-jquery/parents.snippet
  62. +1 −1 javascript-jquery/prepend.snippet
  63. +1 −1 javascript-jquery/prependto.snippet
  64. +1 −1 javascript-jquery/prev.snippet
  65. +1 −1 javascript-jquery/ready.snippet
  66. +1 −1 javascript-jquery/remove.snippet
  67. +1 −1 javascript-jquery/removeattr.snippet
  68. +1 −1 javascript-jquery/removeclass.snippet
  69. +3 −3 javascript-jquery/reset.snippet
  70. +3 −3 javascript-jquery/resize.snippet
  71. +3 −3 javascript-jquery/scroll.snippet
  72. +1 −1 javascript-jquery/sdown.snippet
  73. +3 −3 javascript-jquery/sdownc.snippet
  74. +3 −3 javascript-jquery/sdupc.snippet
  75. +3 −3 javascript-jquery/select.snippet
  76. +1 −1 javascript-jquery/show.snippet
  77. +3 −3 javascript-jquery/showc.snippet
  78. +1 −1 javascript-jquery/sib.snippet
  79. +1 −1 javascript-jquery/size.snippet
  80. +1 −1 javascript-jquery/stoggle.snippet
  81. +3 −3 javascript-jquery/submit.snippet
  82. +1 −1 javascript-jquery/sup.snippet
  83. +1 −1 javascript-jquery/text.snippet
  84. +1 −1 javascript-jquery/this.snippet
  85. +4 −4 javascript-jquery/tog.snippet
  86. +1 −1 javascript-jquery/togclass.snippet
  87. +1 −1 javascript-jquery/togsh.snippet
  88. +1 −1 javascript-jquery/trig.snippet
  89. +1 −1 javascript-jquery/unbind.snippet
  90. +1 −2 javascript-jquery/val.snippet
  91. +1 −1 javascript-jquery/width.snippet
  92. +1 −1 javascript-jquery/wrap.snippet
@@ -1 +1 @@
-<+obj+>.add('<+selector expression+>')<++>
+${1:obj}.add('${2:selector expression}')${3}
@@ -1 +1 @@
-<+obj+>.addClass('<+class name+>')<++>
+${1:obj}.addClass('${2:class name}')${3}
@@ -1 +1 @@
-<+obj+>.after('<+Some text <b>and bold!</b>+>')<++>
+${1:obj}.after('${2:Some text <b>and bold!</b>}')${3}
@@ -1,18 +1,18 @@
$.ajax({
- url: "<+mydomain.com/url+>",
- type: "<+POST+>",
- dataType: "<+xml/html/script/json+>",
- data: $.param( $("<+Element or Expression+>") ),
+ url: "${1:mydomain.com/url}",
+ type: "${2:POST}",
+ dataType: "${3:xml/html/script/json}",
+ data: $.param( $("${4:Element or Expression}") ),
- complete: function() {
- <+//called when complete+>
- },
+ complete: function() {
+ ${5://called when complete}
+ },
- success: function() {
- <+//called when successful+>
- },
+ success: function() {
+ ${6://called when successful}
+ },
- error: function() {
- <+//called when there is an error+>
- },
+ error: function() {
+ ${7://called when there is an error}
+ },
});
@@ -1,4 +1,4 @@
-.ajaxError(function(<+request, settings+>) {
- <+//stuff to do when an AJAX call returns an error+>;
+.ajaxError(function(${1:request, settings}) {
+ ${2://stuff to do when an AJAX call returns an error};
});
-<++>
+${3}
@@ -1,3 +1,3 @@
-$.get('<+/test/ajax-test.xml+>', function(xml){
- <+alert( ("title",xml).text() ) //optional stuff to do after get;+>
-});
+$.get('${1:/test/ajax-test.xml}', function(xml){
+ ${2:alert( ("title",xml).text() ) //optional stuff to do after get;}
+});
@@ -1,3 +1,3 @@
-$.getIfModified('<+/test/test.cgi+>', function(data){
- <+alert( "Data loaded: " + data ) //optional stuff to do after get;+>
+$.getIfModified('${1:/test/test.cgi}', function(data){
+ ${2:alert( "Data loaded: " + data ) //optional stuff to do after get;}
});
@@ -1,4 +1,4 @@
-.ajaxSend(function(<+request, settings+>) {
- <+//stuff to do when an AJAX call returns an error+>;
+.ajaxSend(function(${1:request, settings}) {
+ ${2://stuff to do when an AJAX call returns an error};
});
-<++>
+${3}
@@ -1,18 +1,18 @@
$.ajaxSetup({
- url: "<+mydomain.com/url+>",
- type: "<+POST+>",
- dataType: "<+xml/html/script/json+>",
- data: $.param( $("<+Element or Expression+>") ),
+ url: "${1:mydomain.com/url}",
+ type: "${2:POST}",
+ dataType: "${3:xml/html/script/json}",
+ data: $.param( $("${4:Element or Expression}") ),
- complete: function() {
- <+//called when complete+>
- },
+ complete: function() {
+ ${5://called when complete}
+ },
- success: function() {
- <+//called when successful+>
- },
+ success: function() {
+ ${6://called when successful}
+ },
- error: function() {
- <+//called when there is an error+>
- },
+ error: function() {
+ ${7://called when there is an error}
+ },
});
@@ -1,4 +1,4 @@
$.ajaxStart(function() {
- <+//stuff to do when an AJAX call is started and no other AJAX calls are in progress+>;
+ ${1://stuff to do when an AJAX call is started and no other AJAX calls are in progress};
});
-<++>
+${2}
@@ -1,4 +1,4 @@
$.ajaxStop(function() {
- <+//stuff to do when an AJAX call is started and no other AJAX calls are in progress+>;
+ ${1://stuff to do when an AJAX call is started and no other AJAX calls are in progress};
});
-<++>
+${2}
@@ -1,4 +1,4 @@
$.ajaxSuccess(function() {
- <+//stuff to do when an AJAX call is started and no other AJAX calls are in progress+>;
+ ${1://stuff to do when an AJAX call is started and no other AJAX calls are in progress};
});
-<++>
+${2}
@@ -1 +1 @@
-<+obj+>.animate({<+param1: value1, param2: value2+>}, <+speed+>)<++>
+${1:obj}.animate({${2:param1: value1, param2: value2}}, ${3:speed})${4}
@@ -1 +1 @@
-<+obj+>.append('<+Some text <b>and bold!</b>+>')<++>
+${1:obj}.append('${2:Some text <b>and bold!</b>}')${3}
@@ -1 +1 @@
-<+obj+>.appendTo('<+selector expression+>')<++>
+${1:obj}.appendTo('${2:selector expression}')${3}
@@ -1 +1 @@
-<+obj+>.before('<+Some text <b>and bold!</b>+>')<++>
+${1:obj}.before('${2:Some text <b>and bold!</b>}')${3}
@@ -1,3 +1,3 @@
-<+obj+>.bind('<+event name+>', function(<+event+>) {
- <+// Act on the event+>
-});
+${1:obj}.bind('${2:event name}', function(${3:event}) {
+ ${4:// Act on the event}
+});
@@ -1,3 +1,3 @@
-<+obj+>.blur(function() {
- <+// Act on the event+>
-});
+${1:obj}.blur(function() {
+ ${2:// Act on the event}
+});
@@ -1,3 +1,3 @@
-<+obj+>.change(function() {
- <+// Act on the event+>
-});
+${1:obj}.change(function() {
+ ${2:// Act on the event}
+});
@@ -1 +1 @@
-<+obj+>.children('<+selector expression+>')<++>
+${1:obj}.children('${2:selector expression}')${3}
@@ -1,3 +1,3 @@
-<+obj+>.click(function() {
- <+// Act on the event+>
-});
+${1:obj}.click(function() {
+ ${2:// Act on the event}
+});
@@ -1 +1 @@
-<+obj+>.clone()<++>
+${1:obj}.clone()${2}
@@ -1 +1 @@
-<+obj+>.contains('<+text to find+>')<++>
+${1:obj}.contains('${2:text to find}')${3}
@@ -1 +1 @@
-<+obj+>.css('<+attribute+>', '<+value+>')<++>
+${1:obj}.css('${2:attribute}', '${3:value}')${4}
@@ -1 +1 @@
-<+obj+>.css({<+attribute1+>: '<+value1+>', <+attribute2+>: '<+value2+>'})<++>
+${1:obj}.css({${2:attribute1}: '${3:value1}', ${4:attribute2}: '${5:value2}'})${6}
@@ -1,3 +1,3 @@
-<+obj+>.dblclick(function() {
- <+// Act on the event+>
-});
+${1:obj}.dblclick(function() {
+ ${2:// Act on the event}
+});
@@ -1,3 +1,3 @@
-<+obj+>.each(function(index) {
- <+this.innerHTML = this + " is the element, " + index + " is the position";+>
-});
+${1:obj}.each(function(index) {
+ ${2:this.innerHTML = this + " is the element, " + index + " is the position";}
+});
@@ -1 +1 @@
-$('<++>')<++>
+$('${1}')${2:}
@@ -1 +1 @@
-$.trim('<+string+>')<++>
+$.trim('${1:string}')${2}
@@ -1 +1 @@
-<+obj+>.end()<++>
+${1:obj}.end()${2}
@@ -1,3 +1,3 @@
-<+obj+>.error(function() {
- <+// Act on the event+>
-});
+${1:obj}.error(function() {
+ ${2:// Act on the event}
+});
@@ -1 +1 @@
-<+obj+>.fadeIn('<+slow/400/fast+>')<++>
+${1:obj}.fadeIn('${2:slow/400/fast}')${3}
@@ -1,3 +1,3 @@
-<+obj+>.fadeIn('slow/400/fast', function() {
- <+//Stuff to do *after* the animation takes place+>;
+${1:obj}.fadeIn('slow/400/fast', function() {
+ ${2://Stuff to do *after* the animation takes place};
});
@@ -1 +1 @@
-<+obj+>.fadeOut('<+slow/400/fast+>')<++>
+${1:obj}.fadeOut('${2:slow/400/fast}')${3}
@@ -1,3 +1,3 @@
-<+obj+>.fadeOut('slow/400/fast', function() {
- <+//Stuff to do *after* the animation takes place+>;
+${1:obj}.fadeOut('slow/400/fast', function() {
+ ${2://Stuff to do *after* the animation takes place};
});
@@ -1 +1 @@
-<+obj+>.fadeTo('<+slow/400/fast+>', <+0.5+>)<++>
+${1:obj}.fadeTo('${2:slow/400/fast}', ${3:0.5})${4}
@@ -1,3 +1,3 @@
-<+obj+>.fadeTo('slow/400/fast', <+0.5+>, function() {
- <+//Stuff to do *after* the animation takes place+>;
+${1:obj}.fadeTo('slow/400/fast', ${2:0.5}, function() {
+ ${3://Stuff to do *after* the animation takes place};
});
@@ -1 +1 @@
-<+obj+>.filter('<+selector expression+>')<++>
+${1:obj}.filter('${2:selector expression}')${3}
@@ -1 +1 @@
-<+obj+>.find('<+selector expression+>')<++>
+${1:obj}.find('${2:selector expression}')${3}
@@ -1,3 +1,3 @@
-<+obj+>.focus(function() {
- <+// Act on the event+>
-});
+${1:obj}.focus(function() {
+ ${2:// Act on the event}
+});
@@ -1 +1 @@
-<+obj+>.get(<+element index+>)<++>
+${1:obj}.get(${2:element index})${3}
@@ -1,3 +1,3 @@
-$.getScript('<+somescript.js+>', function(){
- <+//optional stuff to do after getScript;+>
+$.getScript('${1:somescript.js}', function(){
+ ${2://optional stuff to do after getScript;}
});
@@ -1 +1 @@
-<+obj+>.height(<+integer+>)<++>
+${1:obj}.height(${2:integer})${3}
@@ -1 +1 @@
-<+obj+>.hide('<+slow/400/fast+>')<++>
+${1:obj}.hide('${2:slow/400/fast}')${3}
@@ -1,3 +1,3 @@
-<+obj+>.hide('<+slow/400/fast+>', function() {
- <+//Stuff to do *after* the animation takes place+>
+${1:obj}.hide('${2:slow/400/fast}', function() {
+ ${3://Stuff to do *after* the animation takes place}
});
@@ -1,5 +1,5 @@
-<+obj+>.hover(function() {
- <+// Stuff to do when the mouse enters the element;+>
+${1:obj}.hover(function() {
+ ${2:// Stuff to do when the mouse enters the element;}
}, function() {
- <+// Stuff to do when the mouse leaves the element;+>
-});<++>
+ ${3:// Stuff to do when the mouse leaves the element;}
+});${4}
@@ -1 +1 @@
-<+obj+>.html('<+Some text <b>and bold!</b>+>')<++>
+${1:obj}.html('${2:Some text <b>and bold!</b>}')${3}
@@ -1 +1 @@
-<+obj+>.insertAfter('<+selector expression+>')<++>
+${1:obj}.insertAfter('${2:selector expression}')${3}
@@ -1 +1 @@
-<+obj+>.insertBefore('<+selector expression+>')<++>
+${1:obj}.insertBefore('${2:selector expression}')${3}
@@ -1 +1 @@
-<+obj+>.is('<+selector expression+>')<++>
+${1:obj}.is('${2:selector expression}')${3}
@@ -1,3 +1,3 @@
-<+obj+>.load(function() {
- <+// Act on the event+>
-});
+${1:obj}.load(function() {
+ ${2:// Act on the event}
+});
@@ -1,3 +1,3 @@
-<+obj+>.mousedown(function() {
- <+// Act on the event+>
-});
+${1:obj}.mousedown(function() {
+ ${2:// Act on the event}
+});
@@ -1,3 +1,3 @@
-<+obj+>.mousemove(function() {
- <+// Act on the event+>
-});
+${1:obj}.mousemove(function() {
+ ${2:// Act on the event}
+});
@@ -1,3 +1,3 @@
-<+obj+>.mouseout(function() {
- <+// Act on the event+>
-});
+${1:obj}.mouseout(function() {
+ ${2:// Act on the event}
+});
@@ -1,3 +1,3 @@
-<+obj+>.mouseover(function() {
- <+// Act on the event+>
-});
+${1:obj}.mouseover(function() {
+ ${2:// Act on the event}
+});
@@ -1,3 +1,3 @@
-<+obj+>.mouseup(function() {
- <+// Act on the event+>
-});
+${1:obj}.mouseup(function() {
+ ${2:// Act on the event}
+});
@@ -1 +1 @@
-<+obj+>.next('<+selector expression+>')<++>
+${1:obj}.next('${2:selector expression}')${3}
@@ -1 +1 @@
-<+obj+>.not('<+selector expression+>')<++>
+${1:obj}.not('${2:selector expression}')${3}
@@ -1,3 +1,3 @@
-<+obj+>.one('<+event name+>', function(<+event+>) {
- <+// Act on the event once+>
-});
+${1:obj}.one('${2:event name}', function(${3:event}) {
+ ${4:// Act on the event once}
+});
@@ -1 +1 @@
-<+obj+>.parent('<+selector expression+>')<++>
+${1:obj}.parent('${2:selector expression}')${3}
@@ -1 +1 @@
-<+obj+>.parents('<+selector expression+>')<++>
+${1:obj}.parents('${2:selector expression}')${3}
@@ -1 +1 @@
-<+obj+>.prepend('<+Some text <b>and bold!</b>+>')<++>
+${1:obj}.prepend('${2:Some text <b>and bold!</b>}')${3}
@@ -1 +1 @@
-<+obj+>.prependTo('<+selector expression+>')<++>
+${1:obj}.prependTo('${2:selector expression}')${3}
@@ -1 +1 @@
-<+obj+>.prev('<+selector expression+>')<++>
+${1:obj}.prev('${2:selector expression}')${3}
@@ -1,3 +1,3 @@
$(document).ready(function() {
- <+// Stuff to do as soon as the DOM is ready;+>
+ ${1:// Stuff to do as soon as the DOM is ready;}
});
@@ -1 +1 @@
-<+obj+>.remove()<++>
+${1:obj}.remove()${2}
@@ -1 +1 @@
-<+obj+>.removeAttr('<+attribute name+>')<++>
+${1:obj}.removeAttr('${2:attribute name}')${3}
@@ -1 +1 @@
-<+obj+>.removeClass('<+class name+>')<++>
+${1:obj}.removeClass('${2:class name}')${3}
Oops, something went wrong.

0 comments on commit 9e7789e

Please sign in to comment.