---
title: "jQuery $ 冲突 "
author: "hfhwan"
date: "2010-04-21T10:01:45Z"
tags: ["jQuery"]
categories: ["Web前端"]
slug: "jquery"
draft: false
lastmod: "2010-04-21T10:01:45Z"
id: 649062
url: "https://hfhwan.iteye.com/blog/649062"
---

(function($) {&lt;/p&gt;  
&lt;p&gt;    // 这里面的 $ 属于 jquery&lt;/p&gt;  
&lt;p&gt;})(jQuery);

 

我们的jQuery代码可以这样写：

var jq = jQuery.noConflict(); //把$让给第一个实现它的库，用jq代替  
jq(function()  
{  
//\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\**  
}  
);