我怎样才能用 jQuery 写这个?
我的正文部分有两个链接:但我想给它们 jquery touch,因为我是 jquery 的初学者,无法完成它,你能帮忙吗?
click <a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'">here</a>
单击上面的链接,它将调用以下 css 并给出灯箱效果。
<div id="light" class="white_content">Please wait as process is going on..<img src="images/ajax-loader(2).gif" />
<a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'">Close</a>
</div>
<div id="fade" class="black_overlay"></div>
llly 单击关闭后将关闭灯箱。
在我的头部jquery代码是这样的:(document.ready()写的,#btn_submit-按钮id。) .....
$("#btn_submit").bind('click', function(){
//How can i write first anchor tags click in this?
)};
我只是想知道如何在jquery中编写锚标记onclick部分。
我将非常感谢你的帮助。 先感谢您。
There is two links in my body part: but i want to give them jquery touch, as I am a beginner to jquery, not able to get it done can you help?
click <a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'">here</a>
on clicking above link, it'll call following css and give the lightbox effect.
<div id="light" class="white_content">Please wait as process is going on..<img src="images/ajax-loader(2).gif" />
<a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'">Close</a>
</div>
<div id="fade" class="black_overlay"></div>
llly on clicking close it'll close the lightbox.
In my head part jquery code is like this:(document.ready() written, #btn_submit- button id.)
.....
$("#btn_submit").bind('click', function(){
//How can i write first anchor tags click in this?
)};
All I just want to know how to write anchor tags onclick part in jquery.
I'll really appreciate your help.
Thank you in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为此:
您可以编写如下 jquery 代码:
为此:
您可以编写如下 jquery 代码:
因此,在添加 jQuery 代码之后,您的两个链接应如下所示:
更多信息:
For this:
You can write jquery code like:
And for this:
You can write jquery code like:
So after your add jQuery code, your both links should appear like this:
More Info: