如何在同一页面上使用两个不同的jQuery [英] How to use Two different jQuery on the same page

查看:74
本文介绍了如何在同一页面上使用两个不同的jQuery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的项目中,我需要使用两个不同的jquery.
一个用于显示消息(小方框js)..另一个用于显示验证码..

首先tinybox可以正常工作,但是在添加了验证码js之后,tinybox无法正常工作..

对于验证码:

In my project i need to use two different jquery.
one for showing message(tiny box js)..another for captcha..

First tinybox work fine, but after adding captcha js, tinybox doesnot work..

This For Captcha:

  	<script type="text/javascript" src="captcha/jquery-1.5.1.min.js"></script>
	<script type="text/javascript" src="captcha/jquery-ui.min.js"></script>
	<script type="text/javascript" src="captcha/jquery.captcha.js"></script>
	
	

	<link href="captcha/captcha.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" charset="utf-8">
function pageLoad(sender, args)
    {
    captcha();
    }
function captcha() {
	
	
$(function() {
			$j(".ajax-fc-container").captcha({
				borderColor: "silver",
				text: "Verify that you are a human,<br />drag <span>scissors</span> into the circle."
			});
		});
		
}

function  Button2_onclick()
{
captcha();
}
	</script>




这对于Tiny Box消息




This For Tiny Box message

<script type="text/javascript" src="tinybox.js"></script>
     <script type="text/javascript">
    function openJS(){alert(''loaded'')}
function closeJS(){alert(''closed'')}
    function pass()
{
TINY.box.show({html:''Enter the Password minimum 6 character'',animate:false,close:false,boxid:''error'',top:250})
}

function Button1_onclick() {
captcha();
}

    </script>


谢谢n advance


Thanks n advance

推荐答案

(function(){
(function() {


j(.ajax-fc-container").captcha( { borderColor:银色", 文字:请确认您是人类,将< span> span>剪刀</span>拖到圈子中." }); }); } 函数Button2_onclick() { captcha(); } </script>
j(".ajax-fc-container").captcha({ borderColor: "silver", text: "Verify that you are a human,<br />drag <span>scissors</span> into the circle." }); }); } function Button2_onclick() { captcha(); } </script>




这对于Tiny Box消息




This For Tiny Box message

<script type="text/javascript" src="tinybox.js"></script>
     <script type="text/javascript">
    function openJS(){alert(''loaded'')}
function closeJS(){alert(''closed'')}
    function pass()
{
TINY.box.show({html:''Enter the Password minimum 6 character'',animate:false,close:false,boxid:''error'',top:250})
}

function Button1_onclick() {
captcha();
}

    </script>


感谢您提前


Thanks n advance


请参阅我对问题的评论.在我看来,这个问题是人为的.通常,您的jQuery所做的就是这样:它处理事件
Please see my comment to the question. The problem looks artificial to me. Normally, all your jQuery does is this: it handles the event


这篇关于如何在同一页面上使用两个不同的jQuery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆