123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- import 'css/bootstrap.less';
- import 'bootstrap/dist/js/bootstrap.js';
- import 'css/newMenu/public.css';
- import 'css/newMenu/header.css';
- import 'css/newMenu/services.css';
- // import 'js/banner.js';
- import 'js/public.js';
- import 'js/newMenu/map.js';
- $(function () {
- init();
- function init() {
- listFun();
- search();
- navTop();
- };
- function navTop() {
- $(window).scroll(function(){
- var scrolltop=$(document).scrollTop();
- if(scrolltop>0){
- $('.topNav').addClass('navFix')
- }else{
- $('.topNav').removeClass('navFix');
- }
- });
- }
- // search
- function search() {
- $('.searchBtn').click(function () {
- let name = $('.demandSearch').val().trim();
- window.location.href = globalConfig.context + '/portal/service/serviceList?name=' + name
- })
- }
- /*合作客户切换 */
- function listFun() {
- let m = 0,
- liW = $('.customerList ul li').width(),
- len = $('.customerList ul li').length;
- $('.cooperationPeople .listNext').on('click', function () {
- m++;
- if (m > len - 3) {
- m = len - 3;
- };
- $('.customerList ul').animate({
- marginLeft: -liW * m + 'px'
- })
- });
- $('.cooperationPeople .listPre').on('click', function () {
- m--;
- if (m <= 0) {
- m = 0;
- }
- $('.customerList ul').animate({
- marginLeft: -liW * m + 'px'
- })
- });
- }
- })
|