无法加载jQuery

时间:2018-04-10 11:38:12

标签: javascript jquery

我无法在我的codepen.io网站上加载jQuery fadeIn。 这是它的链接。

$("#div1").fadeIn(3000);
$("#div2").fadeIn(3000);
$("#div3").fadeIn(3000);

https://codepen.io/shivam60/pen/oqmeyz

3 个答案:

答案 0 :(得分:1)

如果他们已经在那里,他们就不能fadeIn()

#div1, #div2, #div3 { display: none; }

答案 1 :(得分:0)

你可以通过淡入淡出的一点改变来做到这一点。



$("#div1").hide().fadeIn(5000);
$("#div2").hide().fadeIn(5000);
$("#div3").hide().fadeIn(5000);

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

<div id="div1" class="margin">
   <div id="div2">
     <h1 class="container text-center"><b>Arunachalam Muruganantham</b></h1>
     <h2 class="text-center">(Padman)</h2>
     <img class="img-rounded img-responsive center-block" src="https://cdn-images-1.medium.com/max/800/1*kE6jN-f-3m2fMxiqzh8kzg.jpeg">
     <p class="text-center"><i>Arunachalam Muruganantham receiving Padma Shri from President of India Pranab Mukherjee</i></p>
      </div>
   <div id="div3">
     <p class="p2 text-justify">Arunachalam Muruganantham (Padman) is a social entrepreneur from Coimbatore in Tamil Nadu, India. He is the inventor of a low-cost sanitary pad-making machine and is credited for innovating grassroots mechanisms for generating awareness about traditional unhygienic practices around menstruation in rural India. His mini-machines, which can manufacture sanitary pads for less than a third of the cost of commercial pads, have been installed in 23 of the 29 states of India. He is currently planning to expand the production of these machines to 106 nations.</p>
     <h2 class="text-center"><b>Invention</b><h4>
     <p class="p1 text-justify">In 1998, he married Shanthi.Shortly after, Murugananthan discovered his wife collecting filthy rags and newspapers to use during her menstrual cycle, as sanitary napkins made by multinational corporations were expensive. Troubled by this, he started designing experimental pads. Initially, he made pads out of cotton, but these were rejected by his wife and sisters. Eventually, they stopped co-operating with him and refused to be the test subjects for his innovations. He realised that the raw materials cost 10 paise (0.15¢ US), but the end product sold for 40 times that price. He looked for female volunteers who could test his inventions, but most were too shy to discuss their menstrual issues with him. He started testing it on himself, using a bladder with animal blood, but became the subject of ridicule when the "sanitary pad" was discovered in his village. As menstruation is a taboo subject in India, it left him ostracized by his community and family. He distributed his products free to girls in a local medical college, provided they returned them to him after use.</p>
      <p class="p1 text-justify">It took him two years to discover that the commercial pads used cellulose fibers derived from pine bark wood pulp.  The fibres helped the pads absorb while retaining shape. Imported machines that made the pads cost ₹35 million (US$540,000). So, he devised a low-cost machine that could be operated with minimal training. He sourced the processed pine wood pulp from a supplier in Mumbai and the machines would grind, de-fibrate, press and sterilize the pads under ultraviolet before packaging them for sale. The machine costs ₹65,000 (US$1,000).
In 2006, he visited IIT Madras to show his idea and received suggestions. They registered his invention for the National Innovation Foundation's Grassroots Technological Innovations Award and his idea won the award. He obtained seed funding and founded Jayaashree Industries, which now markets these machines to rural women across India. The machine has been praised for its simplicity and cost-effectiveness, and his commitment to social aid has earned him several awards. Despite offers from several corporate entities to commercialize his venture, he has refused to sell out and continues to provide these machines to self-help groups (SHGs) run by women.</p>
   </div>
   <div id="div4">
     <ul class="list-group list">
       <li>1962 - <b>Born,Coimbatore in Tamil Nadu, India.</b></li>
       <li>1976- <b>Dropped out of school so as to support his family.</b></li>
       <li>1998- <b>Married his wife Shanthi and discovered the problem faced by women in their menstural periods.</b></li>
       <li>2000- <b>Discovers how sanitary napkins work and where their material is derrived from.</b></li>
       <li>2006- <b>Registers a low cast, easy to handel machine to produce sanitary napkins at National Innovation Foundation from IIT Madras.</b></li>
     </ul>
   </div>
   <h3 class="text-center">If you have time, you should read more about this incredible human being on his <a href="https://en.wikipedia.org/wiki/Arunachalam_Muruganantham">Wikipedia</a>  entry.</h3>
</div>
&#13;
&#13;
&#13;

答案 2 :(得分:0)

您首先包含了jquery.ui.min.js,然后包含了jquery.min.js 首先加载jquery https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js 然后加载 https://code.jquery.com/ui/1.11.4/jquery-ui.min.js

jquery是jquery ui的依赖

更新了您的代码笔