Advertisement
Guest User

Untitled

a guest
Jan 19th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.60 KB | None | 0 0
  1. {
  2. "this": {
  3. "prefix": "this",
  4. "body": [
  5. "$(this)$1"
  6. ],
  7. "description": "Log output to console"
  8. },
  9. "Print to console": {
  10. "prefix": "log",
  11. "body": [
  12. "console.log('$1');",
  13. "$2"
  14. ],
  15. "description": "Log output to console"
  16. },
  17. "jquery Ready": {
  18. "prefix": "ready",
  19. "body": [
  20. "jQuery(document).ready(function ($) {\n$1\n});"
  21. ],
  22. "description": "Define document ready"
  23. },
  24. "jquery ": {
  25. "prefix": "j",
  26. "body": [
  27. "$(\"$1\")$2"
  28. ],
  29. "description": ""
  30. },
  31. "Set Timeout Function": {
  32. "prefix": "timeout",
  33. "body": [
  34. "setTimeout(function() {\n$2\n}, $1);"
  35. ],
  36. "description": "Set Timeout Function"
  37. },
  38. "Repeat Function": {
  39. "prefix": "repeat",
  40. "body": [
  41. "(function(){\n $1 \nsetTimeout(arguments.callee, $2); })();"
  42. ],
  43. "description": "Repeat function Function"
  44. },
  45. "owl": {
  46. "prefix": "owl",
  47. "body": [
  48. "$('').owlCarousel({\nloop: true,\nmargin: 10,\nnav: true,\nnavText: [' ',' '],\nresponsive: {\n0: {\n items: 1\n},\n600: {\n items: 3},\n1000: {\n items: 5\n}\n}\n});\n"
  49. ],
  50. "description": "Set Timeout Function"
  51. },
  52. "After": {
  53. "prefix": "After",
  54. "body": [
  55. ".after(${content});"
  56. ],
  57. "description": "Insert content, specified by the parameter, after each element in the set of matched elements."
  58. },
  59. "Append": {
  60. "prefix": "Append",
  61. "body": [
  62. ".append(${content});"
  63. ],
  64. "description": "Insert content, specified by the parameter, to the end of each element in the set of matched elements."
  65. },
  66. "AppendTo": {
  67. "prefix": "AppendTo",
  68. "body": [
  69. ".appendTo(${selector});"
  70. ],
  71. "description": "Insert every element in the set of matched elements to the end of the target."
  72. },
  73. "AttrGet": {
  74. "prefix": "AttrGet",
  75. "body": [
  76. ".attr(${attributeName});"
  77. ],
  78. "description": "Get the value of an attribute for the first element in the set of matched elements."
  79. },
  80. "AttrRemove": {
  81. "prefix": "AttrRemove",
  82. "body": [
  83. ".removeAttr(${attributeName});"
  84. ],
  85. "description": "Remove an attribute from each element in the set of matched elements."
  86. },
  87. "AttrSet": {
  88. "prefix": "AttrSet",
  89. "body": [
  90. ".attr(${attributeName}, ${value});"
  91. ],
  92. "description": "Set one or more attributes for the set of matched elements."
  93. },
  94. "AttrSetFn": {
  95. "prefix": "AttrSetFn",
  96. "body": [
  97. ".attr(${attributeName}, function (index, attr) { ",
  98. "\t$0 ",
  99. "});"
  100. ],
  101. "description": "Set one or more attributes for the set of matched elements."
  102. },
  103. "AttrSetObj": {
  104. "prefix": "AttrSetObj",
  105. "body": [
  106. ".attr({",
  107. "\t${name}: ${value}",
  108. "\t$0",
  109. "});"
  110. ],
  111. "description": "Set one or more attributes for the set of matched elements."
  112. },
  113. "Before": {
  114. "prefix": "Before",
  115. "body": [
  116. ".before(${content});"
  117. ],
  118. "description": "Insert content, specified by the parameter, before each element in the set of matched elements."
  119. },
  120. "Bind": {
  121. "prefix": "Bind",
  122. "body": [
  123. ".bind(${eventType}, function (e) {",
  124. "\t$0",
  125. "});"
  126. ],
  127. "description": "Attach a handler to an event for the elements."
  128. },
  129. "BindWithData": {
  130. "prefix": "BindWithData",
  131. "body": [
  132. ".bind(${eventType}, ${eventData}, function (e) {",
  133. "\t$0",
  134. "});"
  135. ],
  136. "description": "Attach a handler to an event for the elements."
  137. },
  138. "Blur": {
  139. "prefix": "Blur",
  140. "body": [
  141. ".blur(function (e) { ",
  142. "\te.preventDefault();",
  143. "\t$0",
  144. "});"
  145. ],
  146. "description": "Bind an event handler to the \"blur\" JavaScript event, or trigger that event on an element."
  147. },
  148. "Change": {
  149. "prefix": "Change",
  150. "body": [
  151. ".change(function (e) { ",
  152. "\te.preventDefault();",
  153. "\t$0",
  154. "});"
  155. ],
  156. "description": "Bind an event handler to the \"change\" JavaScript event, or trigger that event on an element."
  157. },
  158. "ClassAdd": {
  159. "prefix": "AddClass",
  160. "body": [
  161. ".addClass(${className});"
  162. ],
  163. "description": "Adds the specified class(es) to each of the set of matched elements."
  164. },
  165. "ClassRemove": {
  166. "prefix": "RemoveClass",
  167. "body": [
  168. ".removeClass(${className});"
  169. ],
  170. "description": "Remove a single class, multiple classes, or all classes from each element in the set of matched elements."
  171. },
  172. "ClassToggle": {
  173. "prefix": "ToggleClass",
  174. "body": [
  175. ".toggleClass(${className});"
  176. ],
  177. "description": "Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence."
  178. },
  179. "ClassToggleSwitch": {
  180. "prefix": "ClassToggleSwitch",
  181. "body": [
  182. ".toggleClass(${className}, ${switch});"
  183. ],
  184. "description": "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."
  185. },
  186. "Click": {
  187. "prefix": "Click",
  188. "body": [
  189. ".click(function (e) { ",
  190. "\te.preventDefault();",
  191. "\t$0",
  192. "});"
  193. ],
  194. "description": "Bind an event handler to the \"click\" JavaScript event, or trigger that event on an element."
  195. },
  196. "Clone": {
  197. "prefix": "Clone",
  198. "body": [
  199. ".clone();"
  200. ],
  201. "description": "Create a deep copy of the set of matched elements."
  202. },
  203. "CloneWithEvents": {
  204. "prefix": "CloneWithEvents",
  205. "body": [
  206. ".clone(true);"
  207. ],
  208. "description": "Create a deep copy of the set of matched elements."
  209. },
  210. "CssGet": {
  211. "prefix": "CssGet",
  212. "body": [
  213. ".css(${propertyName});"
  214. ],
  215. "description": "Get the computed style properties for the first element in the set of matched elements."
  216. },
  217. "CssSet": {
  218. "prefix": "CssSet",
  219. "body": [
  220. ".css(${propertyName}, ${value});"
  221. ],
  222. "description": "Set one or more CSS properties for the set of matched elements."
  223. },
  224. "CssSetObj": {
  225. "prefix": "CssSetObj",
  226. "body": [
  227. ".css({",
  228. "\t${propertyName}: ${value}",
  229. "\t$0",
  230. "});"
  231. ],
  232. "description": "Set one or more CSS properties for the set of matched elements."
  233. },
  234. "DataGet": {
  235. "prefix": "DataGet",
  236. "body": [
  237. ".data(${key});"
  238. ],
  239. "description": "Return the value at the named data store for the first element in the uery collection, as set by data(name, value) or by an HTML5 data-* attribute."
  240. },
  241. "DataRemove": {
  242. "prefix": "DataRemove",
  243. "body": [
  244. ".removeData(${element});"
  245. ],
  246. "description": "Remove a previously-stored piece of data."
  247. },
  248. "DataSet": {
  249. "prefix": "DataSet",
  250. "body": [
  251. ".data(${key}, ${value});"
  252. ],
  253. "description": "Store arbitrary data associated with the matched elements."
  254. },
  255. "DataSetObj": {
  256. "prefix": "DataSetObj",
  257. "body": [
  258. ".data({",
  259. "\t${key}: ${value}",
  260. "\t$0",
  261. "});"
  262. ],
  263. "description": "Store arbitrary data associated with the matched elements."
  264. },
  265. "Die": {
  266. "prefix": "Die",
  267. "body": [
  268. ".die(${eventType});"
  269. ],
  270. "description": "Remove event handlers previously attached using .live() from the elements."
  271. },
  272. "DieAll": {
  273. "prefix": "DieAll",
  274. "body": [
  275. ".die();"
  276. ],
  277. "description": "Remove event handlers previously attached using .live() from the elements."
  278. },
  279. "DieFn": {
  280. "prefix": "DieFn",
  281. "body": [
  282. ".die(${eventType}, ${handler});"
  283. ],
  284. "description": "Remove event handlers previously attached using .live() from the elements."
  285. },
  286. "DocReady": {
  287. "prefix": "DocReady",
  288. "body": [
  289. "$(document).ready(function () {",
  290. "\t$0",
  291. "});"
  292. ],
  293. "description": "Function to execute when the DOM is fully loaded."
  294. },
  295. "DocReadyShort": {
  296. "prefix": "DocReadyShort",
  297. "body": [
  298. "$(function () {",
  299. "\t$0",
  300. "});"
  301. ],
  302. "description": "Function to execute when the DOM is fully loaded."
  303. },
  304. "EachElement": {
  305. "prefix": "EachElement",
  306. "body": [
  307. ".each(function (index, element) {",
  308. "\t// element == this",
  309. "\t$0",
  310. "});"
  311. ],
  312. "description": "Iterate over a uery object, executing a function for each matched element. "
  313. },
  314. "Each": {
  315. "prefix": "Each",
  316. "body": [
  317. "$.each(${collection}, function (indexInArray, valueOfElement) { ",
  318. "\t$0 ",
  319. "});"
  320. ],
  321. "description": "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."
  322. },
  323. "Empty": {
  324. "prefix": "Empty",
  325. "body": [
  326. ".empty();"
  327. ],
  328. "description": "Remove all child nodes of the set of matched elements from the DOM."
  329. },
  330. "FadeIn": {
  331. "prefix": "FadeIn",
  332. "body": [
  333. ".fadeIn();"
  334. ],
  335. "description": "Display the matched elements by fading them to opaque."
  336. },
  337. "FadeInFull": {
  338. "prefix": "FadeInFull",
  339. "body": [
  340. ".fadeIn(${duration}, function () {",
  341. "\t$0",
  342. "});"
  343. ],
  344. "description": "Display the matched elements by fading them to opaque."
  345. },
  346. "FadeOut": {
  347. "prefix": "FadeOut",
  348. "body": [
  349. ".fadeOut();"
  350. ],
  351. "description": "Hide the matched elements by fading them to transparent."
  352. },
  353. "FadeOutFull": {
  354. "prefix": "FadeOutFull",
  355. "body": [
  356. ".fadeOut(${duration}, function () {",
  357. "\t$0",
  358. "});"
  359. ],
  360. "description": "Hide the matched elements by fading them to transparent."
  361. },
  362. "FadeTo": {
  363. "prefix": "FadeTo",
  364. "body": [
  365. ".fadeTo(${duration}, ${opacity});"
  366. ],
  367. "description": "Adjust the opacity of the matched elements."
  368. },
  369. "FadeToFull": {
  370. "prefix": "FadeToFull",
  371. "body": [
  372. ".fadeTo(${duration}, ${opacity}, function () {",
  373. "\t$0",
  374. "});"
  375. ],
  376. "description": "Adjust the opacity of the matched elements."
  377. },
  378. "Find": {
  379. "prefix": "Find",
  380. "body": [
  381. ".find(${selector2});"
  382. ],
  383. "description": "Get the descendants of each element in the current set of matched elements, filtered by a selector, uery object, or element."
  384. },
  385. "Focus": {
  386. "prefix": "Focus",
  387. "body": [
  388. ".focus(function (e) { ",
  389. "\te.preventDefault();",
  390. "\t$0",
  391. "});"
  392. ],
  393. "description": "Bind an event handler to the \"focus\" JavaScript event, or trigger that event on an element."
  394. },
  395. "Get": {
  396. "prefix": "Get",
  397. "body": [
  398. "$.get(\"${url}\", ${data},",
  399. "\tfunction (data, textStatus, XHR) {",
  400. "\t\t$0",
  401. "\t},",
  402. "\t\"${dataType}\"",
  403. ");"
  404. ],
  405. "description": "Load data from the server using a HTTP GET request."
  406. },
  407. "GetJson": {
  408. "prefix": "GetJson",
  409. "body": [
  410. "$.getJSON(\"${url}\", ${data},",
  411. "\tfunction (data, textStatus, XHR) {",
  412. "\t\t$0",
  413. "\t}",
  414. ");"
  415. ],
  416. "description": "Load JSON-encoded data from the server using a GET HTTP request."
  417. },
  418. "GetScript": {
  419. "prefix": "GetScript",
  420. "body": [
  421. "$.getScript(\"${url}\", function (script, textStatus, XHR) {",
  422. "\t$0",
  423. "});"
  424. ],
  425. "description": "Load a JavaScript file from the server using a GET HTTP request, then execute it."
  426. },
  427. "HasClass": {
  428. "prefix": "HasClass",
  429. "body": [
  430. ".hasClass(${className});"
  431. ],
  432. "description": "Determine whether any of the matched elements are assigned the given class."
  433. },
  434. "HeightGet": {
  435. "prefix": "HeightGet",
  436. "body": [
  437. ".height();"
  438. ],
  439. "description": "Get the current computed height for the first element in the set of matched elements."
  440. },
  441. "HeightSet": {
  442. "prefix": "HeightSet",
  443. "body": [
  444. ".height(${value});"
  445. ],
  446. "description": "Set the CSS height of every matched element."
  447. },
  448. "Hide": {
  449. "prefix": "Hide",
  450. "body": [
  451. ".hide();"
  452. ],
  453. "description": "Hide the matched elements."
  454. },
  455. "HideFull": {
  456. "prefix": "HideFull",
  457. "body": [
  458. ".hide(${duration}, function () {",
  459. "\t$0",
  460. "});"
  461. ],
  462. "description": "Hide the matched elements."
  463. },
  464. "Hover": {
  465. "prefix": "Hover",
  466. "body": [
  467. ".hover(function () {",
  468. "\t\t// over",
  469. "\t\t$0",
  470. "\t}, function () {",
  471. "\t\t// out",
  472. "\t}",
  473. ");"
  474. ],
  475. "description": "Bind two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements."
  476. },
  477. "HtmlGet": {
  478. "prefix": "HtmlGet",
  479. "body": [
  480. ".html();"
  481. ],
  482. "description": "Get the HTML contents of the first element in the set of matched elements."
  483. },
  484. "HtmlSet": {
  485. "prefix": "HtmlSet",
  486. "body": [
  487. ".html(${htmlString});"
  488. ],
  489. "description": "Set the HTML contents of each element in the set of matched elements."
  490. },
  491. "InnerHeight": {
  492. "prefix": "InnerHeight",
  493. "body": [
  494. ".innerHeight();"
  495. ],
  496. "description": "Get the current computed height for the first element in the set of matched elements, including padding but not border."
  497. },
  498. "InnerWidth": {
  499. "prefix": "InnerWidth",
  500. "body": [
  501. ".innerWidth();"
  502. ],
  503. "description": "Get the current computed inner width for the first element in the set of matched elements, including padding but not border."
  504. },
  505. "InsertAfter": {
  506. "prefix": "InsertAfter",
  507. "body": [
  508. "$(${target}).insertAfter(${selector});"
  509. ],
  510. "description": "Insert every element in the set of matched elements after the target."
  511. },
  512. "InsertBefore": {
  513. "prefix": "InsertBefore",
  514. "body": [
  515. "$(${target}).insertBefore(${selector});"
  516. ],
  517. "description": "Insert every element in the set of matched elements before the target."
  518. },
  519. "KeyDown": {
  520. "prefix": "KeyDown",
  521. "body": [
  522. ".keydown(function (e) { ",
  523. "\t$0",
  524. "});"
  525. ],
  526. "description": "Bind an event handler to the \"keydown\" JavaScript event, or trigger that event on an element."
  527. },
  528. "KeyPress": {
  529. "prefix": "KeyPress",
  530. "body": [
  531. ".keypress(function (e) { ",
  532. "\t$0",
  533. "});"
  534. ],
  535. "description": "Bind an event handler to the \"keypress\" JavaScript event, or trigger that event on an element."
  536. },
  537. "KeyUp": {
  538. "prefix": "KeyUp",
  539. "body": [
  540. ".keyup(function (e) { ",
  541. "\t$0",
  542. "});"
  543. ],
  544. "description": "Bind an event handler to the \"keyup\" JavaScript event, or trigger that event on an element."
  545. },
  546. "LoadGet": {
  547. "prefix": "LoadGet",
  548. "body": [
  549. ".load(\"${url}\", \"${data}\", function (response, status, request) {",
  550. "\tthis; // dom element",
  551. "\t$0",
  552. "});"
  553. ],
  554. "description": "Load data from the server and place the returned HTML into the matched element."
  555. },
  556. "LoadPost": {
  557. "prefix": "LoadPost",
  558. "body": [
  559. ".load(\"${url}\", \"${data}\", function (response, status, request) {",
  560. "\tthis; // dom element",
  561. "\t$0",
  562. "});"
  563. ],
  564. "description": "Load data from the server and place the returned HTML into the matched element."
  565. },
  566. "Map": {
  567. "prefix": "Map",
  568. "body": [
  569. "$.map(${arrayOrObject}, function (elementOrValue, indexOrKey) {",
  570. "\t$0",
  571. "});"
  572. ],
  573. "description": "Translate all items in an array or object to new array of items."
  574. },
  575. "MouseDown": {
  576. "prefix": "MouseDown",
  577. "body": [
  578. ".mousedown(function () { ",
  579. "\t$0",
  580. "});"
  581. ],
  582. "description": "Bind an event handler to the \"mousedown\" JavaScript event, or trigger that event on an element."
  583. },
  584. "MouseEnter": {
  585. "prefix": "MouseEnter",
  586. "body": [
  587. ".mouseenter(function () { ",
  588. "\t$0",
  589. "});"
  590. ],
  591. "description": "Bind an event handler to be fired when the mouse enters an element, or trigger that handler on an element."
  592. },
  593. "MouseLeave": {
  594. "prefix": "MouseLeave",
  595. "body": [
  596. ".mouseleave(function () { ",
  597. "\t$0",
  598. "});"
  599. ],
  600. "description": "Bind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element."
  601. },
  602. "MouseMove": {
  603. "prefix": "MouseMove",
  604. "body": [
  605. ".mousemove(function (e) { ",
  606. "\t// values: e.clientX, e.clientY, e.pageX, e.pageY",
  607. "\t$0",
  608. "});"
  609. ],
  610. "description": "Bind an event handler to the \"mousemove\" JavaScript event, or trigger that event on an element."
  611. },
  612. "MouseOut": {
  613. "prefix": "MouseOut",
  614. "body": [
  615. ".mouseout(function () { ",
  616. "\t$0",
  617. "});"
  618. ],
  619. "description": "Bind an event handler to the \"mouseout\" JavaScript event, or trigger that event on an element."
  620. },
  621. "MouseOver": {
  622. "prefix": "MouseOver",
  623. "body": [
  624. ".mouseover(function () { ",
  625. "\t$0",
  626. "});"
  627. ],
  628. "description": "Bind an event handler to the \"mouseover\" JavaScript event, or trigger that event on an element."
  629. },
  630. "MouseUp": {
  631. "prefix": "MouseUp",
  632. "body": [
  633. ".mouseup(function () { ",
  634. "\t$0",
  635. "});"
  636. ],
  637. "description": "Bind an event handler to the \"mouseup\" JavaScript event, or trigger that event on an element."
  638. },
  639. "OffsetGet": {
  640. "prefix": "OffsetGet",
  641. "body": [
  642. "var offset = .offset();",
  643. "var top = offset.top;",
  644. "var left = offset.left;",
  645. "$0"
  646. ],
  647. "description": "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."
  648. },
  649. "OffsetParent": {
  650. "prefix": "OffsetParent",
  651. "body": [
  652. "var offset = .offsetParent();",
  653. "var top = offset.top;",
  654. "var left = offset.left;",
  655. "$0"
  656. ],
  657. "description": "Get the closest ancestor element that is positioned."
  658. },
  659. "On": {
  660. "prefix": "On",
  661. "body": [
  662. ".on(${events}, function () {",
  663. "\t$0",
  664. "});"
  665. ],
  666. "description": "Attach an event handler function for one or more events to the selected elements."
  667. },
  668. "One": {
  669. "prefix": "One",
  670. "body": [
  671. ".one(${events}, function (e) {",
  672. "\t$0",
  673. "});"
  674. ],
  675. "description": "Attach a handler to an event for the elements. The handler is executed at most once per element per event type."
  676. },
  677. "OneWithData": {
  678. "prefix": "OneWithData",
  679. "body": [
  680. ".one(${events}, ${data}, function (e) {",
  681. "\t$0",
  682. "});"
  683. ],
  684. "description": "Attach a handler to an event for the elements. The handler is executed at most once per element per event type."
  685. },
  686. "OuterHeight": {
  687. "prefix": "OuterHeight",
  688. "body": [
  689. ".outerHeight(${includeMargin});"
  690. ],
  691. "description": "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."
  692. },
  693. "OuterWidth": {
  694. "prefix": "OuterWidth",
  695. "body": [
  696. ".outerWidth(${includeMargin});"
  697. ],
  698. "description": "Get the current computed width for the first element in the set of matched elements, including padding and border."
  699. },
  700. "Position": {
  701. "prefix": "Position",
  702. "body": [
  703. "var position = .position();",
  704. "var top = position.top;",
  705. "var left = position.left;",
  706. "$0"
  707. ],
  708. "description": "Get the current coordinates of the first element in the set of matched elements, relative to the offset parent."
  709. },
  710. "Post": {
  711. "prefix": "Post",
  712. "body": [
  713. "$.post(\"${url}\", ${data},",
  714. "\tfunction (data, textStatus, XHR) {",
  715. "\t\t$0",
  716. "\t},",
  717. "\t\"${dataType}\"",
  718. ");"
  719. ],
  720. "description": "Load data from the server using a HTTP POST request."
  721. },
  722. "Prepend": {
  723. "prefix": "Prepend",
  724. "body": [
  725. ".prepend(${content});"
  726. ],
  727. "description": "Insert content, specified by the parameter, to the beginning of each element in the set of matched elements."
  728. },
  729. "PrependTo": {
  730. "prefix": "PrependTo",
  731. "body": [
  732. ".prependTo(${selector});"
  733. ],
  734. "description": "Insert every element in the set of matched elements to the beginning of the target."
  735. },
  736. "Remove": {
  737. "prefix": "Remove",
  738. "body": [
  739. ".remove();"
  740. ],
  741. "description": "Remove the set of matched elements from the DOM."
  742. },
  743. "RemoveExp": {
  744. "prefix": "RemoveExp",
  745. "body": [
  746. ".remove(${expression});"
  747. ],
  748. "description": "Remove the set of matched elements from the DOM."
  749. },
  750. "ReplaceAll": {
  751. "prefix": "ReplaceAll",
  752. "body": [
  753. ".replaceAll(${target});"
  754. ],
  755. "description": "Replace each target element with the set of matched elements."
  756. },
  757. "ReplaceWith": {
  758. "prefix": "ReplaceWith",
  759. "body": [
  760. ".replaceWith(${newContent});"
  761. ],
  762. "description": "Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed."
  763. },
  764. "Resize": {
  765. "prefix": "Resize",
  766. "body": [
  767. ".resize(function () { ",
  768. "\t$0",
  769. "});"
  770. ],
  771. "description": "Bind an event handler to the \"resize\" JavaScript event, or trigger that event on an element."
  772. },
  773. "Scroll": {
  774. "prefix": "Scroll",
  775. "body": [
  776. ".scroll(function () { ",
  777. "\t$0",
  778. "});"
  779. ],
  780. "description": "Bind an event handler to the \"scroll\" JavaScript event, or trigger that event on an element."
  781. },
  782. "ScrollLeftGet": {
  783. "prefix": "ScrollLeftGet",
  784. "body": [
  785. ".scrollLeft();"
  786. ],
  787. "description": "Get the current horizontal position of the scroll bar for the first element in the set of matched elements."
  788. },
  789. "ScrollLeftSet": {
  790. "prefix": "ScrollLeftSet",
  791. "body": [
  792. ".scrollLeft(${value});"
  793. ],
  794. "description": "Set the current horizontal position of the scroll bar for each of the set of matched elements."
  795. },
  796. "ScrollTopGet": {
  797. "prefix": "ScrollTopGet",
  798. "body": [
  799. ".scrollTop();"
  800. ],
  801. "description": "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."
  802. },
  803. "ScrollTopSet": {
  804. "prefix": "ScrollTopSet",
  805. "body": [
  806. ".scrollTop(${value});"
  807. ],
  808. "description": "Set the current vertical position of the scroll bar for each of the set of matched elements."
  809. },
  810. "Select": {
  811. "prefix": "Select",
  812. "body": [
  813. ".select(function () { ",
  814. "\t$0",
  815. "});"
  816. ],
  817. "description": "Bind an event handler to the \"select\" JavaScript event, or trigger that event on an element."
  818. },
  819. "SelectTrigger": {
  820. "prefix": "SelectTrigger",
  821. "body": [
  822. ".select();"
  823. ],
  824. "description": "Bind an event handler to the \"select\" JavaScript event, or trigger that event on an element."
  825. },
  826. "Show": {
  827. "prefix": "Show",
  828. "body": [
  829. ".show();"
  830. ],
  831. "description": "Display the matched elements."
  832. },
  833. "ShowFull": {
  834. "prefix": "ShowFull",
  835. "body": [
  836. ".show(${duration}, function () {",
  837. "\t$0",
  838. "});"
  839. ],
  840. "description": "Display the matched elements."
  841. },
  842. "SlideDown": {
  843. "prefix": "SlideDown",
  844. "body": [
  845. ".slideDown();"
  846. ],
  847. "description": "Display the matched elements with a sliding motion."
  848. },
  849. "SlideDownFull": {
  850. "prefix": "SlideDownFull",
  851. "body": [
  852. ".slideDown(${duration}, function () {",
  853. "\t$0",
  854. "});"
  855. ],
  856. "description": "Display the matched elements with a sliding motion."
  857. },
  858. "SlideToggle": {
  859. "prefix": "SlideToggle",
  860. "body": [
  861. ".slideToggle();"
  862. ],
  863. "description": "Display or hide the matched elements with a sliding motion."
  864. },
  865. "SlideToggleFull": {
  866. "prefix": "SlideToggleFull",
  867. "body": [
  868. ".slideToggle(${duration}, function () {",
  869. "\t$0",
  870. "});"
  871. ],
  872. "description": "Display or hide the matched elements with a sliding motion."
  873. },
  874. "SlideUp": {
  875. "prefix": "SlideUp",
  876. "body": [
  877. ".slideUp();"
  878. ],
  879. "description": "Display the matched elements with a sliding motion."
  880. },
  881. "SlideUpFull": {
  882. "prefix": "SlideUpFull",
  883. "body": [
  884. ".slideUp(${duration}, function () {",
  885. "\t$0",
  886. "});"
  887. ],
  888. "description": "Display the matched elements with a sliding motion."
  889. },
  890. "Submit": {
  891. "prefix": "Submit",
  892. "body": [
  893. ".submit(function (e) { ",
  894. "\te.preventDefault();",
  895. "\t$0",
  896. "});"
  897. ],
  898. "description": "Bind an event handler to the \"submit\" JavaScript event, or trigger that event on an element."
  899. },
  900. "SubmitTrigger": {
  901. "prefix": "SubmitTrigger",
  902. "body": [
  903. ".submit();"
  904. ],
  905. "description": "Bind an event handler to the \"submit\" JavaScript event, or trigger that event on an element."
  906. },
  907. "TextGet": {
  908. "prefix": "TextGet",
  909. "body": [
  910. ".text();"
  911. ],
  912. "description": "Get the combined text contents of each element in the set of matched elements, including their descendants."
  913. },
  914. "TextSet": {
  915. "prefix": "TextSet",
  916. "body": [
  917. ".text(${textString});"
  918. ],
  919. "description": "Set the content of each element in the set of matched elements to the specified text."
  920. },
  921. "Toggle": {
  922. "prefix": "Toggle",
  923. "body": [
  924. ".toggle();"
  925. ],
  926. "description": "Display or hide the matched elements."
  927. },
  928. "ToggleFull": {
  929. "prefix": "ToggleFull",
  930. "body": [
  931. ".toggle(${duration}, function () {",
  932. "\t$0",
  933. "});"
  934. ],
  935. "description": "Display or hide the matched elements."
  936. },
  937. "ToggleSwitch": {
  938. "prefix": "ToggleSwitch",
  939. "body": [
  940. ".toggle(${showOrHide});"
  941. ],
  942. "description": "Display or hide the matched elements."
  943. },
  944. "Trigger": {
  945. "prefix": "Trigger",
  946. "body": [
  947. ".trigger(${eventType});"
  948. ],
  949. "description": "Execute all handlers and behaviors attached to the matched elements for the given event type."
  950. },
  951. "TriggerHandler": {
  952. "prefix": "TriggerHandler",
  953. "body": [
  954. ".triggerHandler(${eventType});"
  955. ],
  956. "description": "Execute all handlers attached to an element for an event."
  957. },
  958. "TriggerHandlerWithData": {
  959. "prefix": "TriggerHandlerWithData",
  960. "body": [
  961. ".triggerHandler(${eventType}, { ${name}: ${value} });"
  962. ],
  963. "description": "Execute all handlers attached to an element for an event."
  964. },
  965. "TriggerWithData": {
  966. "prefix": "TriggerWithData",
  967. "body": [
  968. ".trigger(${eventType}, { ${name}: ${value} });"
  969. ],
  970. "description": "Execute all handlers and behaviors attached to the matched elements for the given event type."
  971. },
  972. "Unbind": {
  973. "prefix": "Unbind",
  974. "body": [
  975. ".unbind(${eventType});"
  976. ],
  977. "description": "Remove a previously-attached event handler from the elements."
  978. },
  979. "UnbindAll": {
  980. "prefix": "UnbindAll",
  981. "body": [
  982. ".unbind();"
  983. ],
  984. "description": "Remove a previously-attached event handler from the elements."
  985. },
  986. "Unload": {
  987. "prefix": "Unload",
  988. "body": [
  989. ".unload(function () { ",
  990. "\t$0",
  991. "});"
  992. ],
  993. "description": "Bind an event handler to the \"unload\" JavaScript event."
  994. },
  995. "ValGet": {
  996. "prefix": "ValGet",
  997. "body": [
  998. ".val();"
  999. ],
  1000. "description": "Get the current value of the first element in the set of matched elements."
  1001. },
  1002. "ValSet": {
  1003. "prefix": "ValSet",
  1004. "body": [
  1005. ".val(${value});"
  1006. ],
  1007. "description": "Set the value of each element in the set of matched elements."
  1008. },
  1009. "WidthGet": {
  1010. "prefix": "WidthGet",
  1011. "body": [
  1012. ".width();"
  1013. ],
  1014. "description": "Get the current computed width for the first element in the set of matched elements."
  1015. },
  1016. "WidthSet": {
  1017. "prefix": "WidthSet",
  1018. "body": [
  1019. ".width(${value});"
  1020. ],
  1021. "description": "Set the CSS width of each element in the set of matched elements."
  1022. },
  1023. "Wrap": {
  1024. "prefix": "Wrap",
  1025. "body": [
  1026. ".wrap(\"<${wrappingElement}></${wrappingElement}>\");"
  1027. ],
  1028. "description": "Wrap an HTML structure around each element in the set of matched elements."
  1029. },
  1030. "WrapAll": {
  1031. "prefix": "WrapAll",
  1032. "body": [
  1033. ".wrapAll(\"<${wrappingElement}></${wrappingElement}>\");"
  1034. ],
  1035. "description": "Wrap an HTML structure around all elements in the set of matched elements."
  1036. },
  1037. "WrapInner": {
  1038. "prefix": "WrapInner",
  1039. "body": [
  1040. ".wrapInner(\"<${wrappingElement}></${wrappingElement}>\");"
  1041. ],
  1042. "description": "Wrap an HTML structure around the content of each element in the set of matched elements."
  1043. },
  1044. "Ajax": {
  1045. "prefix": "Ajax",
  1046. "body": [
  1047. " $.ajax({",
  1048. " type: 'POST',",
  1049. " url: 'backend.php',",
  1050. " data: \"q=\"+myform.serialize(),",
  1051. " success: function(data){",
  1052. " // on success use return data here",
  1053. " },",
  1054. " error: function(xhr, type, exception) { ",
  1055. " // if ajax fails display error alert",
  1056. " alert(\"ajax error response type \"+type);",
  1057. " }",
  1058. " });",
  1059. ""
  1060. ],
  1061. "description": "Ajax"
  1062. }
  1063. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement