jquery right lower corner rotation Ring Menu Special effects code _javascript tips

Source: Internet
Author: User

jquery implementation of the lower right corner of the rotating Ring menu special effects code, is fixed in the lower right corner of the page, when the user clicked the Main Menu button, the submenu item will rotate into the page in a loop, and use ANIMATE.CSS to make animation effect.
The effect chart is as follows:

Online Preview Click to download

HTML code:

<div class= "Htmleaf-container" >
 <div id= ' ss_menu ' >
  <div>
  <i class= "fa fa-qq" > </i>
  </div>
  <div>
  <i class= "fa Fa-weibo" ></i>
  </div>
  <div>
  <i class= "fa fa-weixin" ></i>
  </div>
  <div>
  <i class= "fa Fa-renren "></i>
  </div>
  <div class= ' menu ' >
  <div class= ' share ' id= '" Ss_ Toggle ' data-rot= ' >
   <div class= ' Circle ' ></div>
   <div class= ' bar ' ></div>
  </div>
  </div>
 </div>
</div>

JS Code:

$ (document). Ready (function (EV) {
 var toggle = $ (' #ss_toggle ');
 var menu = $ (' #ss_menu ');
 var rot;
 $ (' #ss_toggle '). On (' click ', function (EV) {
  rot = parseint ($ (this). Data (' rot '))-180;
  Menu.css (' transform ', ' rotate (' + rot + ' deg) ');
  Menu.css (' webkittransform ', ' rotate (' + rot + ' deg) ');
  if (rot/180% 2 = 0) {
   toggle.parent (). addclass (' ss_active ');
   Toggle.addclass (' close ');
  } else {
   toggle.parent (). Removeclass (' ss_active ');
   Toggle.removeclass (' close ');
  }
  $ (this). Data (' rot ', rot);
 });
 Menu.on (' Transitionend webkittransitionend otransitionend ', function () {
  if (rot/180% 2 = 0) {
   $ (' #ss_menu Div i '). addclass (' ss_animate ');
  } else {
   $ (' #ss_menu div i '). Removeclass (' ss_animate ');}});

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.