Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
73f55bec
Commit
73f55bec
authored
Jul 01, 2006
by
John Resig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Getting ready for 1.0a.
parent
6bf86674
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
11 deletions
+56
-11
build.bat
build.bat
+0
-1
build.sh
build.sh
+1
-1
form.js
form/form.js
+13
-0
jquery.js
jquery/jquery.js
+42
-9
No files found.
build.bat
View file @
73f55bec
...
@@ -3,4 +3,3 @@ type jquery\jquery.js > jquery-svn.js
...
@@ -3,4 +3,3 @@ type jquery\jquery.js > jquery-svn.js
type fx\fx.js >> jquery-svn.js
type fx\fx.js >> jquery-svn.js
type event\event.js >> jquery-svn.js
type event\event.js >> jquery-svn.js
type ajax\ajax.js >> jquery-svn.js
type ajax\ajax.js >> jquery-svn.js
type form\form.js >> jquery-svn.js
build.sh
View file @
73f55bec
#!/bin/sh
#!/bin/sh
cat
jquery/jquery.js event/event.js fx/fx.js ajax/ajax.js
form/form.js
>
jquery-svn.js
cat
jquery/jquery.js event/event.js fx/fx.js ajax/ajax.js
>
jquery-svn.js
form/form.js
View file @
73f55bec
...
@@ -127,6 +127,19 @@ $.fn.ajaxForm = function(target, post_cb, pre_cb) {
...
@@ -127,6 +127,19 @@ $.fn.ajaxForm = function(target, post_cb, pre_cb) {
});
});
};
};
/*
$.ajax({
type: "POST",
url: "foo.cgi",
data: $.param( $("form").formdata() ),
success: function(){},
error: function(){},
complete: function(){}
});
*/
/**
/**
* A simple wrapper function that sits around the .serialize()
* A simple wrapper function that sits around the .serialize()
* method, allowing you to easily extract the data stored within
* method, allowing you to easily extract the data stored within
...
...
jquery/jquery.js
View file @
73f55bec
/*
/*
* jQuery
* jQuery
- New Wave Javascript
*
*
* Copyright (c) 2006 John Resig (jquery.com)
* Copyright (c) 2006 John Resig (jquery.com)
* Licensed under the MIT License:
* Licensed under the MIT License:
...
@@ -17,9 +17,15 @@ window.undefined = window.undefined;
...
@@ -17,9 +17,15 @@ window.undefined = window.undefined;
* @constructor
* @constructor
*/
*/
function
jQuery
(
a
,
c
)
{
function
jQuery
(
a
,
c
)
{
// Watch for when a jQuery object is passed in as an arg
if
(
a
&&
a
.
jquery
)
return
a
;
// If the context is global, return a new object
if
(
window
==
this
)
if
(
window
==
this
)
return
new
jQuery
(
a
,
c
);
return
new
jQuery
(
a
,
c
);
// Find the matching elements and save them for later
this
.
cur
=
jQuery
.
Select
(
this
.
cur
=
jQuery
.
Select
(
a
||
jQuery
.
context
||
document
,
a
||
jQuery
.
context
||
document
,
c
&&
c
.
jquery
&&
c
.
get
(
0
)
||
c
c
&&
c
.
jquery
&&
c
.
get
(
0
)
||
c
...
@@ -29,7 +35,33 @@ function jQuery(a,c) {
...
@@ -29,7 +35,33 @@ function jQuery(a,c) {
/**
/**
* The jQuery query object.
* The jQuery query object.
*/
*/
var
$
=
jQuery
;
if
(
!
window
.
$
)
var
$
=
jQuery
;
/*
* Handle support for overriding other $() functions. Way too many libraries
* provide this function to simply ignore it and overwrite it.
*/
else
var
$
=
function
(
a
,
c
)
{
// Check to see if this is a possible collision case
if
(
!
c
&&
a
.
constructor
==
String
&&
// Make sure that the expression is a colliding one
!
/
[^
a-zA-Z0-9_-
]
/
.
test
(
a
)
&&
// and that there are no elements that match it
// (this is the one truly ambiguous case)
!
document
.
getElementsByTagName
(
a
).
length
)
{
// Only return the element if it's found
var
obj
=
document
.
getElementById
(
a
);
if
(
obj
)
return
obj
;
}
return
jQuery
(
a
,
c
);
};
jQuery
.
fn
=
jQuery
.
prototype
=
{
jQuery
.
fn
=
jQuery
.
prototype
=
{
/**
/**
...
@@ -67,7 +99,7 @@ jQuery.fn = jQuery.prototype = {
...
@@ -67,7 +99,7 @@ jQuery.fn = jQuery.prototype = {
},
},
set
:
function
(
a
,
b
)
{
set
:
function
(
a
,
b
)
{
return
this
.
each
(
function
(){
return
this
.
each
(
function
(){
if
(
b
==
undefined
)
if
(
b
==
=
undefined
)
for
(
var
j
in
a
)
for
(
var
j
in
a
)
jQuery
.
attr
(
this
,
j
,
a
[
j
]);
jQuery
.
attr
(
this
,
j
,
a
[
j
]);
else
else
...
@@ -94,9 +126,9 @@ jQuery.fn = jQuery.prototype = {
...
@@ -94,9 +126,9 @@ jQuery.fn = jQuery.prototype = {
},
},
css
:
function
(
a
,
b
)
{
css
:
function
(
a
,
b
)
{
return
a
.
constructor
!=
String
||
b
?
return
a
.
constructor
!=
String
||
b
?
this
.
each
(
function
(){
this
.
each
(
function
(){
if
(
!
b
)
if
(
b
===
undefined
)
for
(
var
j
in
a
)
for
(
var
j
in
a
)
jQuery
.
attr
(
this
.
style
,
j
,
a
[
j
]);
jQuery
.
attr
(
this
.
style
,
j
,
a
[
j
]);
else
else
...
@@ -457,9 +489,9 @@ jQuery.g = {
...
@@ -457,9 +489,9 @@ jQuery.g = {
empty
:
"!a.childNodes.length"
,
empty
:
"!a.childNodes.length"
,
root
:
"a==(a.ownerDocument||document).documentElement"
,
root
:
"a==(a.ownerDocument||document).documentElement"
,
contains
:
"(a.innerText||a.innerHTML).indexOf(m[3])!=-1"
,
contains
:
"(a.innerText||a.innerHTML).indexOf(m[3])!=-1"
,
visible
:
"(!a.type||a.type!='hidden')&&(jQuery.css(a,'display')!=
'none'&&jQuery.css(a,'visibility')!= 'hidden')"
,
visible
:
"(!a.type||a.type!='hidden')&&(jQuery.css(a,'display')!='none'&&jQuery.css(a,'visibility')!= 'hidden')"
,
hidden
:
"(a.type&&a.type
==
'hidden')||jQuery.css(a,'display')=='none'||jQuery.css(a,'visibility')== 'hidden'"
,
hidden
:
"(a.type&&a.type
==
'hidden')||jQuery.css(a,'display')=='none'||jQuery.css(a,'visibility')== 'hidden'"
,
enabled
:
"
a.disabled==false
"
,
enabled
:
"
!a.disabled
"
,
disabled
:
"a.disabled"
,
disabled
:
"a.disabled"
,
checked
:
"a.checked"
checked
:
"a.checked"
},
},
...
@@ -493,7 +525,8 @@ jQuery.token = [
...
@@ -493,7 +525,8 @@ jQuery.token = [
jQuery
.
Select
=
function
(
t
,
context
)
{
jQuery
.
Select
=
function
(
t
,
context
)
{
context
=
context
||
jQuery
.
context
||
document
;
context
=
context
||
jQuery
.
context
||
document
;
if
(
t
.
constructor
!=
String
)
return
[
t
];
if
(
t
.
constructor
!=
String
)
return
t
.
constructor
==
Array
?
t
:
[
t
];
if
(
!
t
.
indexOf
(
"//"
)
)
{
if
(
!
t
.
indexOf
(
"//"
)
)
{
context
=
context
.
documentElement
;
context
=
context
.
documentElement
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment