jQuery基础知识点有哪些

这篇文章将为大家详细讲解有关jQuery基础知识点有哪些,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。

为企业提供网站设计制作、网站制作、网站优化、网络营销推广、竞价托管、品牌运营等营销获客服务。成都创新互联公司拥有网络营销运营团队,以丰富的互联网营销经验助力企业精准获客,真正落地解决中小企业营销获客难题,做到“让获客更简单”。自创立至今,成功用技术实力解决了企业“网站建设、网络品牌塑造、网络营销”三大难题,同时降低了营销成本,提高了有效客户转化率,获得了众多企业客户的高度认可!

jQuery语法实例

  • $(this).hide()

  • jQuery 的 hide() 函数,隐藏当前的 HTML 元素。

  • $("p").hide()

  • jQuery 的 hide() 函数,隐藏所有

    元素。

  • $(".test").hide()

  • jQuery 的 hide() 函数,隐藏所有 class="test" 的元素。

  • $("#test").hide()

  • jQuery 的 hide() 函数,隐藏 id="test" 的元素。

  •  

Hiding - Sliding- Fading

  • jQuery fadeOut()

  • 简单的 jQuery fadeout() 函数。

  • jQuery hide()

  • 简单的 jQuery hide() 函数。

  • Hide explanations

  • 如何隐藏部分文本。

  • Slide panel

  • 简单的 Slide Panel 效果。

  • jQuery animate()

  • 简单的 jQuery animate() 函数。

  •  

jQuery:1.1.1,$(this).hide()
    $(document).ready(function(){   $("button").click(function(){   $(this).hide(); }); });     Click me 
 test Click me2 Click me3 Click me4   
jQuery:1.1.2,$("p").hide()
    $(document).ready(function(){ $("button").click(function(){ $("p").hide(); }); });     

This is a heading

 

This is a paragraph.

 

This is another paragraph.

 Click me  
jQuery:1.1.3,$(".test").hide()
    $(document).ready(function() {   $("button").click(function()   {   $(".test").hide();   }); });     This is a heading This is a paragraph.

 

This is another paragraph.

 Click me   
jQuery:1.1.4,$("#test").hide()
    $(document).ready(function(){   $("button").click(function(){     $("#test").hide();   }); });     

This is a heading

 

This is a paragraph.

 This is another paragraph.

 Click me   
jQuery:1.2.1,fadeOut()
    $(document).ready(function(){   $("#test").click(function(){   $(this).fadeOut();   }); });     CLICK ME AWAY!
 

如果您点击上面的框,它会淡出。

   
jQuery:1.2.2.hide()
     $(document).ready(function(){   $("p").click(function(){   $(this).hide();   }); });     

If you click on me, I will disappear.

   
jQuery:1.2.3,explanations
    $(document).ready(function(){ $(".ex .hide").click(function(){ $(this).parents(".ex").hide("slow"); }); });    div.ex { background-color:#e5eecc; padding:7px; border:solid 1px #c3c3c3; }       

Island Trading

  Hide me 

Contact: Helen Bennett  Garden House Crowther Way London

 
  

Paris Trading

  Hide me 

Contact: Marie Bertrand  265, Boulevard Charonne Paris

 
   
jQuery:1.2.4,panel
      $(document).ready(function(){ $(".flip").click(function(){     $(".panel").slideToggle("slow");   }); });      div.panel,p.flip { margin:0px; padding:5px; text-align:center; background:#e5eecc; border:solid 1px #c3c3c3; } div.panel { height:120px; display:none; }         

W3School - 领先的 Web 技术教程站点

 

在 W3School,你可以找到你所需要的所有网站建设教程。

 
   请点击这里

    
jQuery:1.2.5,animation
     $(document).ready(function(){   $("#start").click(function(){   $("#box").animate({height:300},"slow");   $("#box").animate({width:300},"slow");   $("#box").animate({height:100},"slow");   $("#box").animate({width:100},"slow");   }); });        

Start Animation

       

关于“jQuery基础知识点有哪些”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。


分享标题:jQuery基础知识点有哪些
网站路径:http://pwwzsj.com/article/gjeodj.html

其他资讯