background preloader

Jquery

Facebook Twitter

CSS. Caractères spéciaux et entités HTML - Doc Alex. Create a Fun Tweet Counter With jQuery. In this tutorial, we will look at using jQuery to call Twitter’s API and then use the results to create a widget for a blog or personal website that shows what hours during the day we tweet at the most. The Twitter API is HTTP based, and can return results either as XML or JSON. As jQuery has a JSON parser built-in, and tends to be lighter weight than XML, we’ll use that. Sparklines Since our widget will need to show the hourly usage visually, we’ll use a charting jQuery plugin calledSparklines to generate a graph of tweeting hours. Final Product When all is done, our widget should look like this. To make this happen, we’ll need to write some Javascript which performs the following: Construct a URL to call the Twitter APIParse the results as JSONEnumerate through results, fetching the items we needUse the items to create a set of data for the chartRender the chartPerform any final UI finishing touches Step 1: Determining the Twitter API URL The base URL for the search method is: $.getJSON()

Créez votre thème Wordpress de A à Z. jQuery : écrivez moins pour faire plus ! Tutorials.