Snipplrhttp://snipplr.com/language/jquery/tags/data
Recent snippets posted on Snipplr.comen-usFri, 18 Aug 2017 15:02:42 GMT(jQuery) jQuery Ui Autocomplete, Custom ajax data - Cwertherhttp://snipplr.com/view/55406/jquery-ui-autocomplete-custom-ajax-data/
This is made for a webservice that outputs varaiable data according to user input, ajax is called each time there is a change on the input. ]]>Fri, 17 Jun 2011 18:15:02 GMThttp://snipplr.com/view/55406/jquery-ui-autocomplete-custom-ajax-data/(jQuery) CARGAR CONTENIDO,FUNCION, ETC CON AJAX, JQUERY Y PHP - serialk89http://snipplr.com/view/55333/cargar-contenidofuncion-etc-con-ajax-jquery-y-php/
Enviar datos por medio de $.ajax, propidad de jquery que permite ocupar ajax con php en jquery, se puede ocupar para cualquier cosa ]]>Fri, 17 Jun 2011 01:22:24 GMThttp://snipplr.com/view/55333/cargar-contenidofuncion-etc-con-ajax-jquery-y-php/(jQuery) Animated Pitchbars - FatFolderDesignerhttp://snipplr.com/view/54562/animated-pitchbars/
The comments for this are broken down into 2 parts, first the script is talked about, then theres a little about the HTML code that the script relies on. You can find more information at the URL, as well as an example of it in action. You can leave comments here or at the link if you have any questions or comments, or if you found a nice use for it.
First the script.
Use jquery to load this once the document is complete. The function starts with variables, the first line of them are ones for easy modification, pitches in the number of pitches it will show at once, and the shortdelay/longdelay is the delay between animating individual and pitches and the delay between animating the last displayed pitch and starting from the top again respectively.
After that there is a while statement, this takes the appropriate pitch and wraps each element around a span for animation purposes. Then it gets into the main scripting and animation section.
The each function runs through each of the spans and starts the animation on it. First is fades the current value out, it inserts the new pitch, pre-set at 0 opacity, and fades it in span-by-span. Once the loops is complete it runs a couple checks; is it the last pitch being displayed, is it the last pitch in the list of all pitches, and what itâ€™s going to be doing next. In the first two cases it resets the appropriate counter, the last check determines if it will run the short delay (between pitches being displayed) or the long delay (between displaying the last pitch and starting the animation cycle again).
With this setup the script will run forever, looping when needed. It does require some HTML formatting though, is in the second section.
Second, the HTML
The first section is the list of pitches, stored in an un-ordered list with the id "pitches". Each pitch simply goes in a list item. Theres nothing more to creating the list of all your pitches.
The display goes inside the divs. The class pitchbar is my own simply for formattingand is not required the other one, activepitch# is the area where the the current pitches will be displayed. The "#" is for each pitch that you display at a time from 1 to your max, for example the code below has a pitches of three, so I have 3 divs; activepitch1, activepitch2, activepitch3. The example at the url has 5 divs and a pitches value of 5 as well. ]]>Sun, 29 May 2011 05:28:11 GMThttp://snipplr.com/view/54562/animated-pitchbars/(jQuery) Store the relationship between elements using .data() - 1manhttp://snipplr.com/view/52617/store-the-relationship-between-elements-using-data/
Very useful snippet to link elements together. ]]>Wed, 27 Apr 2011 02:13:13 GMThttp://snipplr.com/view/52617/store-the-relationship-between-elements-using-data/(jQuery) Serialize Form to JSON - virgilhttp://snipplr.com/view/42212/serialize-form-to-json/
usage; $.toJSON($(\'form\').serializeObject()); ]]>Thu, 14 Oct 2010 01:35:49 GMThttp://snipplr.com/view/42212/serialize-form-to-json/(jQuery) Jquery Passing Dynamic Data to Event Handlers - Meander365http://snipplr.com/view/41138/jquery-passing-dynamic-data-to-event-handlers/
I can see this being useful for when you want to pass a lot of associated data to an event handler from elements and their chosen trigger action. ]]>Wed, 29 Sep 2010 17:34:58 GMThttp://snipplr.com/view/41138/jquery-passing-dynamic-data-to-event-handlers/(jQuery) jQuery Create a Custom Filter That Finds Elements With Data - Meander365http://snipplr.com/view/40753/jquery-create-a-custom-filter-that-finds-elements-with-data/
This is dead handy. The purpose of the custom filter is to select all elements which have data attached. You can even find specific data. ]]>Sun, 19 Sep 2010 13:13:37 GMThttp://snipplr.com/view/40753/jquery-create-a-custom-filter-that-finds-elements-with-data/(jQuery) JQUERY / AJAX PARSE XML TO TABLE - vagrantradiohttp://snipplr.com/view/28423/jquery--ajax-parse-xml-to-table/
jQuery Ajax function to load xml data into a table and add class to even rows for striping. ]]>Tue, 16 Feb 2010 15:37:00 GMThttp://snipplr.com/view/28423/jquery--ajax-parse-xml-to-table/