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
458d427c
Commit
458d427c
authored
Jan 06, 2007
by
John Resig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed the docs for noConflict, fixed a bug with pager.
parent
ab028768
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
pager.js
build/docs/js/pager.js
+3
-1
jquery.js
src/jquery/jquery.js
+9
-5
No files found.
build/docs/js/pager.js
View file @
458d427c
...
...
@@ -68,7 +68,9 @@ $.fn.pager = function(step) {
pager
=
$
(
"<ul class='nav-page'></ul>"
);
for
(
var
i
=
0
;
i
<
names
.
length
;
i
++
)
$
(
"<a href=''></a>"
).
rel
(
i
).
html
(
names
[
i
]
).
click
(
function
()
{
$
(
"<a href=''></a>"
).
attr
({
rel
:
i
,
innerHTML
:
names
[
i
]
}).
click
(
function
()
{
return
handleCrop
(
this
.
rel
);
}).
wrap
(
"<li></li>"
).
parent
().
appendTo
(
pager
);
...
...
src/jquery/jquery.js
View file @
458d427c
...
...
@@ -1130,28 +1130,32 @@ jQuery.extend({
* using the 'jQuery' variable. For example, where you used to do
* $("div p"), you now must do jQuery("div p").
*
* @example $.noConflict();
* @example jQuery.noConflict();
* // Do something with jQuery
* jQuery("div p").hide();
* // Do something with another library's $()
* $("content").style.display = 'none';
* @desc Maps the original object that was referenced by $ back to $
*
* @example
$
.noConflict();
* @example
jQuery
.noConflict();
* (function($) {
* $(function() {
* // more code using $ as alias to jQuery
* });
* })(jQuery);
* // other code using $ as an alias to the o
riginal implementation (not jQuery)
* // other code using $ as an alias to the o
ther library
* @desc Reverts the $ alias and then creates and executes a
* function to provide the $ as a jQuery alias inside the functions
* scope. Inside the function the original $ object is not available.
* This works well for most plugins that don't rely on any other library.
*
*
* @name noConflict
* @name
$.
noConflict
* @type undefined
* @cat Core
*/
noConflict
:
function
()
{
if
(
jQuery
.
_$
)
if
(
jQuery
.
_$
)
$
=
jQuery
.
_$
;
},
...
...
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