Home > Web Front-end > JS Tutorial > body text

css配合jquery美化 select_jquery

WBOY
Release: 2016-05-16 17:11:32
Original
1285 people have browsed it

一个简单的css配合jq美化select
css配合jquery美化 select_jquery 

复制代码 代码如下:







复制代码 代码如下:

<script> <BR>$(document).ready(function() { <BR>$('#basic-usage-demo').fancySelect(); <br><br>// Boilerplate <BR>var repoName = 'fancyselect' <br><br>$.get('' + repoName, function(repo) { <BR>var el = $('#top').find('.repo'); <br><br>el.find('.stars').text(repo.watchers_count); <BR>el.find('.forks').text(repo.forks_count); <BR>}); <br><br>var menu = $('#top').find('menu'); <br><br>function positionMenuArrow() { <BR>var current = menu.find('.current'); <br><br>menu.find('.arrow').css('left', current.offset().left + (current.outerWidth() / 2)); <BR>} <br><br>$(window).on('resize', positionMenuArrow); <br><br>menu.on('click', 'a', function(e) { <BR>var el = $(this), <BR>href = el.attr('href'), <BR>currentSection = $('#main').find('.current'); <br><br>e.preventDefault(); <br><br>menu.find('.current').removeClass('current'); <br><br>el.addClass('current'); <br><br>positionMenuArrow(); <br><br>if (currentSection.length) { <BR>currentSection.fadeOut(300).promise().done(function() { <BR>$(href).addClass('current').fadeIn(300); <BR>}); <BR>} else { <BR>$(href).addClass('current').fadeIn(300); <BR>} <BR>}); <br><br>menu.find('a:first').trigger('click') <BR>}); <BR></script>

复制代码 代码如下:


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!