/Snippets/js/jqcsssetobj.snippet

# · Unknown · 40 lines · 39 code · 1 blank · 0 comment · 0 complexity · 9f988e2dacdc0b489b3c5100f4b6ea3f MD5 · raw file

  1. <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  2. <CodeSnippet Format="1.1.0">
  3. <Header>
  4. <SnippetTypes>
  5. <SnippetType>Expansion</SnippetType>
  6. </SnippetTypes>
  7. <Title>jQuery: Set a key/value object as style properties to all matched elements.</Title>
  8. <Author>John Sheehan (@johnsheehan)</Author>
  9. <Shortcut>jqcsssetobj</Shortcut>
  10. <HelpUrl>http://jquerysnippets.codeplex.com</HelpUrl>
  11. </Header>
  12. <Snippet>
  13. <Declarations>
  14. <Literal>
  15. <ID>selector</ID>
  16. <ToolTip>Elements to set style properties on</ToolTip>
  17. <Default>selector</Default>
  18. </Literal>
  19. <Literal>
  20. <ID>name</ID>
  21. <ToolTip>Name of style property</ToolTip>
  22. <Default>name</Default>
  23. </Literal>
  24. <Literal>
  25. <ID>value</ID>
  26. <ToolTip>Value to set</ToolTip>
  27. <Default>value</Default>
  28. </Literal>
  29. </Declarations>
  30. <Code Language="jscript">
  31. <![CDATA[
  32. $$($selector$).css({
  33. $name$: $value$
  34. $end$
  35. });]]>
  36. </Code>
  37. </Snippet>
  38. </CodeSnippet>
  39. </CodeSnippets>