写给设计人的10个jQuery特效

视觉·编程 No Comments »

来源:幸福收藏夹

jQuery已经不是什么新鲜的事儿,记得第一次听说是在catch the digital flow上。总把它认为是非常难的东西,也就没有认真去了解他了。直到学完CSS的大部分内容,才开始接触这种”write less, do more” 的Javascrīpt框架。今天,这篇文章的最重要内容是来自Web Designer Wall的一篇教程,一篇包含了10个jQuery特效的教程。这里不打算全文翻译,想以自己的语言来表达,或许这样更方便大家理解/自己以后学习,也可能更准确地描述。

提示:教程中所用的 jQuery 版本为1.2.3。这篇文章是为jQuery新手而写的。

先试试看? View jQuery DemosDownload Demo RAR

jQuery是如何工作的?

首先,你需要下载一个jQuery版本,并将它插入到<head>标签内。然后,你将需要写函数来告诉jQuery做些什么,下面的这个图表将告诉你jQuery是怎样工作的(点击图片,查看大图):

写给设计人的10个jQuery特效01
Read the rest of this entry »

用jQuery UI控制字体大小

视觉·编程 No Comments »

by Connor Zwick

JQuery’s UI can add so much to a web page. There are many different widgets that the UI provides. One up and coming star, is the slider. In this tutorial, I will show you how to use a slider to control the text size of an article on a page. This lets the user control exactly the size that suits them, and is also a pretty impressive feature to have on a site!

作者:Connor Zwick

I am a freelance web designer. I am currently renovating my personal site, which will be up within the month hopefully. I know HTML, CSS, Javascript, JQuery, PHP, Flash, and Ruby on Rails. I am also doing several website for pay currently. As well as designing a web site for a robotics team for free. This website will feature a lot of what I will cover in this tutorial. I have also coded a media management site and blog in Ruby on Rails. I also have extensive Photoshop experience.
Read the rest of this entry »

jQuery实现的Fancy Zoom效果

视觉·编程 No Comments »

Zoomy JavaScript based loosely on Fancy Zoom by Cabel Sasser.
一个非常棒的类似HighSlide的效果,代码实现的也很小,只有6K多点。

在线演示地址:http://orderedlist.com/demos/fancy-zoom-jquery/
下载地址:点击这里

另外还有一个非常棒的导航菜单效果,也是jQuery实现的。分别提提供了在线演示源代码(不是我做的)。

利用jQuery实现文本框的聚焦

视觉·编程 No Comments »

作者:Realazy

先说明我们的目的。我们知道,当代浏览器(modern browsers)的文本框的聚焦(focus)样式可以通过CSS的伪类:focus来设置。假设我们有这么一段代码:

<form>
    <dl>
        <dt>Name: <dt>
            <dd><input type="text" /></dd>
        <dt>Password: <dt>
            <dd><input type="password" /></dd>
        <dt>Textarea: <dt>
            <dd><textarea></textarea></dd>
    </dl>
</form>

则我们这样的CSS就可以搞定focus样式:

input[type="text"]:focus, input[type="password"]:focus, textarea:focus { border: 1px solid #f00; background: #fcc; }

Read the rest of this entry »

jQuery Ajax全解析

视觉·编程 No Comments »

来源:lulu Studio

jQuery确实是一个挺好的轻量级的JS框架,能帮助我们快速的开发JS应用,并在一定程度上改变了我们写JavaScript代码的习惯。

废话少说,直接进入正题,我们先来看一些简单的方法,这些方法都是对jQuery.ajax()进行封装以方便我们使用的方法,当然,如果要处理复杂的逻辑,还是需要用到jQuery.ajax()的(这个后面会说到).

1. load( url, [data], [callback] ) :载入远程 HTML 文件代码并插入至 DOM 中。

url(String) : 请求的HTML页的URL地址。
data(Map) : (可选参数) 发送至服务器的 key/value 数据。
callback(Callback) : (可选参数) 请求完成时(不需要是success的)的回调函数。

这个方法默认使用 GET 方式来传递的,如果[data]参数有传递数据进去,就会自动转换为POST方式的。jQuery 1.2 中,可以指定选择符,来筛选载入的 HTML 文档,DOM 中将仅插入筛选出的 HTML 代码。语法形如 “url #some > selector”。
Read the rest of this entry »

Q网志 , powered by 七十二松 (72pines). WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS 登录