html - jQuery fadeIn Doesn't seem to run? -


very simple jquery project practice. have set button ( #btn ) , wanted see if possible fade in div when click button. set fiddle, wrong code itself?

link jsfiddle.

--code--

-jquery-

> jquery(function() {  >           $('#btn').click(function(){ >               $('#text2').fadein(1000); >               });      }) 

--html--

<div id="btn">      <button>click me!</button>   </div>  <div id="text">  <h1> hello </h1>  </div>  <div id="text2">  <h2 style> hi there! <h2>  </div> 

fadein() works display:none; css property, not opacity. use .css('opacity', '1') or animate that...

jsfiddle


Comments

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -