Beginning JavaScript and CSS Development with jQuery (Wrox by Richard York

By Richard York

The jQuery JavaScript framework is a emerging big name on the earth of internet improvement. JavaScript frameworks normally have grown to develop into immensely renowned some time past few years in parallel with the ever-increasing presence of JavaScript-driven, so-called net 2.0 web pages that make heavy use of applied sciences like AJAX and JavaScript normally for slick graphical improvements that might be most unlikely or even more bulky to include with no JavaScript.

jQuery’s undertaking as a JavaScript library is easy — it strives to make the lives of internet builders more uncomplicated through patching over definite parts of cross-browser improvement and through making different initiatives normally wanted by means of builders a lot more uncomplicated. jQuery has the true, confirmed skill to lessen many strains of plain-vanilla JavaScript to simply a number of traces, and, in lots of situations, only a unmarried line. jQuery strives to take away limitations to JavaScript improvement by way of removal redundancy anyplace attainable and normalizing cross-browser JavaScript improvement in key parts the place browsers may differently fluctuate, reminiscent of Microsoft’s occasion API and the W3C occasion API, and different, extra remedial projects like getting the mouse cursor’s place whilst an occasion has taken place.

jQuery is a compact, light-weight library that at the moment works in Microsoft’s net Explorer browser from model 6 on, Firefox from model 1.5 on, Safari from model 2.0.2 on, Opera from model nine on, and Google’s new Chrome browser from model 0.2 on. Getting begun with jQuery is so easy — all you should do is comprise a unmarried hyperlink of markup on your HTML or XHTML files that comes with the library. all through this ebook, I show jQuery’s API (Application Programming Interface) elements intimately and convey you the way all of the nuts and bolts of this framework come jointly to enable you swiftly boost client-side applications.

I additionally disguise the jQuery UI library, which makes redundant user-interface (UI) projects at the purchaser part ridiculously effortless and obtainable to daily internet builders who would possibly not have a lot JavaScript programming services. have you puzzled how web content make digital pop-up home windows utilizing JavaScript, HTML, and CSS? The jQuery UI library offers the facility to create those pop-up home windows and comprises the power to animate transitions like fading the window off and on, or having it re-size from very small to complete sized. The jQuery UI library provides the power to exploit animations and transitions utilizing JavaScript, markup, and CSS that you could be have proposal formerly may possibly merely were performed with Adobe’s Flash player.

What This publication Covers

This publication covers the jQuery JavaScript framework and the jQuery UI JavaScript framework and demonstrates in nice element tips to use the jQuery framework to get extra effects extra fast out of JavaScript programming. I disguise every one technique uncovered via jQuery’s API, which includes the right way to make universal, redundant projects pass even more speedy in much less code. a few examples are tools that assist you to pick components from a markup rfile throughout the DOM and strategies that assist you to traverse via these choices and filter out them utilizing jQuery’s fine-grained controls. This makes operating with the DOM more straightforward and extra easy. I additionally hide how jQuery gets rid of yes cross-browser, cross-platform improvement complications just like the occasion version; not just does it cast off those complications, however it additionally makes it more uncomplicated to paintings with occasions by way of decreasing the quantity of code it's essential write to connect occasions. It even grants the facility to simulate events.

Later within the ebook, I hide how one can leverage the jQuery UI library to make graphically pushed UI widgets. jQuery supplies the power to damage content material up between a number of tabs within the similar web page. you've gotten the facility to customise the feel and appear of the tabs, or even to create a sophisticated appear and feel by means of supplying assorted results that are available in case you mouse over tabs and click them. The jQuery UI library additionally makes it effortless to create accordion sidebars, just like the one on Apple’s Mac site. those sidebars have or extra panels, and in the event you mouse over an merchandise, one pane transitions to a different through a soft, seamless animation in which the previous pane collapses and the continuing pane expands.

The jQuery UI library additionally offers the facility to make any point draggable with the mouse; through clicking and protecting and relocating the mouse, you could flow parts round on a web page. It additionally makes it so easy to create drag-and-drop consumer interfaces. this is used to make a losing area the place you're taking components from different components of the web page and drop them in one other, as you are going to on your working system’s dossier supervisor in the event you are looking to circulate a folder from one position to a different. you may make lists which are sortable through drag-and-drop, rearranging parts according to the place you drop them. it's also possible to have a consumer interface the place you drag the mouse cursor to make a choice, as you will on your working system’s dossier supervisor in the event you are looking to choose a couple of dossier. Then jQuery UI additionally exposes the facility to re-size components on a web page utilizing the mouse. All of these neat issues for you to do in your computer’s laptop, it's also possible to do in an internet browser with jQuery UI.

jQuery UI additionally offers a widget for getting into a date right into a box utilizing a pleasant, obtainable JavaScript-driven calendar that pops up in the event you click an enter field.

You may also make customized pop-up dialogues which are like digital pop-up home windows, other than they don’t open a separate browser window — they arrive up utilizing markup, CSS, and JavaScript.

Another widget that jQuery UI offers is a graphical slider bar, just like your media player’s quantity control.

As jQuery has performed for JavaScript programming mostly, jQuery UI strives to do for redundant graphical person interface (GUI) initiatives. jQuery UI promises the facility to make specialist user-interface widgets with less improvement effort.

This booklet is for a person drawn to doing extra with much less code! you will have a uncomplicated knowing of JavaScript. I assessment a few easy JavaScript programming options, reminiscent of the development API, yet i don't pass into nice element in regards to the JavaScript language itself. You’ll are looking to have not less than a simple clutch of the record item version, or DOM, and easy JavaScript programming syntax. also, you’ll want to know your approach round CSS and HTML, considering wisdom of these applied sciences is additionally assumed. an entire newbie could possibly clutch what's happening within the examples during this publication yet would possibly not comprehend sure terminology and programming innovations that may be provided in a beginner’s JavaScript consultant, so when you are a newbie and demand with urgent ahead, i like to recommend doing so with a starting JavaScript publication to be had to boot. particularly, i like to recommend the next Wrox books for extra aid with the basics:
* starting net Programming with HTML, XHTML, and CSS, 2d ed. (2008), via Jon Duckett
* starting CSS: Cascading variety Sheets for website design, 2d ed. (2007), additionally written by means of yours truly.
* starting JavaScript, third ed. (2007), by way of Paul Wilton and Jeremy McPeak

For extra wisdom of JavaScript above and past what's coated during this booklet, i like to recommend expert JavaScript for internet builders, second ed. (2009), by means of Nicholas C. Zakas.

Show description

Read Online or Download Beginning JavaScript and CSS Development with jQuery (Wrox Programmer to Programmer) PDF

Best javascript books

Understanding Ajax Using Javascript To Create Rich Internet Applications

AJAX is sizzling, scorching, scorching! Why? it really is basic. With AJAX, web builders and architects can create web-based functions that appear and feel like computing device purposes. those are responsive, highly-interactive purposes that characterize a brand new breed referred to as "Rich net functions" (RIA). This publication is a advisor to designing, enforcing, and debugging AJAX purposes.

Plug-In CSS 100 Power Solutions

A hundred CSS strength options in a single convenient consultant This sensible source comprises a hundred ready-to-run CSS plug-ins you should use to create dynamic websites. all the plug-ins contain HTML examples and reveal pictures displaying particular finish effects you could in attaining straight away. tools for utilizing CSS with JavaScript and HTML5 to make websites much more interactive and dynamic also are incorporated.

Instant Node.js Starter

Application your scalable community purposes and net companies with Node. js with this publication and booklet review research anything new immediately! a quick, quick, centred consultant supplying instant effects tips on how to use module styles and Node Packet supervisor (NPM) on your functions detect callback styles in NodeJS comprehend the use Node.

jQuery 2 Recipes A Problem-Solution Approach

JQuery is frequently known as the write much less, do extra javascript library. It permits a number of transparent traces of chic, well-tested, code to switch many pages of complicated hand-coded script, rushing improvement instances and offering great expense rate reductions. you'll find jQuery 2 Recipes problem-solution method of be an exceptional worth and a feature-packed source as you start to incorporate jQuery on your personal initiatives.

Extra resources for Beginning JavaScript and CSS Development with jQuery (Wrox Programmer to Programmer)

Example text

At one time, Netscape was the dominant, de facto standard. 6 percent of world market share, and Microsoft’s IE is dominant. At its most popular, IE held more than 90 percent of the market. Now IE holds around 70 percent; Firefox holds 21 percent; and Safari holds roughly 7 percent, Opera and others have around 2 percent combined. The browsing market can and does fluctuate. In the real world, there are lots of people who use less popular browsers. And 2 percent may sound small at first glance, but keep in mind that is 2 percent of a very large number.

I’m glad you asked. ❑❑ In the preceding example, if JavaScript had been disabled, the end-user could still have clicked on the link to see a larger version of the thumbnail image. This makes your website much more accessible. ❑❑ When JavaScript is included in an externally loaded file, you get a speed boost, since the JavaScript only has to be loaded once, and from there on is cached by the client browser. ❑❑ While it takes some planning, the cross-browser inconsistencies and incompatibilities can be completely overcome.

You can limit the amount of white space you use in a document. Indent content with two spaces instead of four. Overcoming the headaches with document caching, on the other hand, is a much easier task. You can force a browser to update a document by changing its path. lastModified=09/16/07. js, but is technically a different path to the browser and, consequently, will force the browser into refreshing its cached copy of the document. lastModified=09/16/07 portion of the path is what’s called the query string portion of the path.

Download PDF sample

Rated 4.44 of 5 – based on 39 votes