<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Snipplr</title>
    <description>Recent snippets posted on Snipplr.com</description>
    <link>https://snipplr.com/</link>
    <lastBuildDate>Tue, 09 Jun 2026 09:59:00 +0000</lastBuildDate>
    <item>
      <title>(jQuery) Set Default Value for Select (dropdown) Lists Using value attribute - halk</title>
      <link>https://snipplr.com/view/67752/set-default-value-for-select-dropdown-lists-using-value-attribute</link>
      <description>&lt;p&gt;For some reason setting a default value for select elements does not work. This one line of jquery solves that problem.  Assign a value (value="something") to the select tag that is to be the default value.  With jquery get all select elements with a (value) attribute set.  For some reason I couldnt get the value of (value) with jquery, it would only return the first item in the list and not the value of the attribute(value). Oldschool Javascript managed to return it though.  The result is that when the document becomes ready jquery finds all select boxes and changes their value to the value stored in the attribute(value) of the select tag.  This means that you can set default values for select elements in the same way you set them for other elements - by assigning them a (value)  -  value="whatever"&lt;/p&gt;</description>
      <pubDate>Tue, 16 Oct 2012 01:33:32 UTC</pubDate>
      <guid>https://snipplr.com/view/67752/set-default-value-for-select-dropdown-lists-using-value-attribute</guid>
    </item>
    <item>
      <title>(jQuery) Document Ready with Global Ajax Listener and Status Indicator - halk</title>
      <link>https://snipplr.com/view/67740/document-ready-with-global-ajax-listener-and-status-indicator</link>
      <description>&lt;p&gt;This will monitor the status of all ajax calls on the page.  When ajax starts i show an animated spinner gif and display a message that ajax has been requested.  On completion of a call the status returned is displayed and the spinner is hidden to indicate the process is complete.  This is without an extra line of code in any of the functions that call ajax, and applies globaly to all functions that make ajax calls on the page.&lt;/p&gt;</description>
      <pubDate>Mon, 15 Oct 2012 09:19:52 UTC</pubDate>
      <guid>https://snipplr.com/view/67740/document-ready-with-global-ajax-listener-and-status-indicator</guid>
    </item>
  </channel>
</rss>
