使用Slick Carousal插件

时间:2015-05-21 16:40:28

标签: jquery html

我正在尝试将Slick's Lazy Loading Carousal添加到网站。

的标签

<head>
    <link href="nav.css" type="text/css" rel="stylesheet">
    <link href="home.css" type="text/css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="slick/slick.css"/>
    <link rel="stylesheet" type="text/css" href="slick/slick-theme.css"/>
    <script type="text/javascript" src="//code.jquery.com/jquery-1.11.0.min.js"></script>
    <script type="text/javascript" src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
    <script type="text/javascript" src="slick/slick.min.js"></script>
    <title>Home</title>
</head>

HTML

<div class="slideShow">
    <div>1</div>
    <div>2</div>
    <div>3</div>
    <div>4</div>
    <div>5</div>
    <div>6</div>
    <div>7</div>
    <div>8</div>
    <div>9</div>
    <div>10</div>
</div>

的jQuery

$(document).ready(function(){
    $('.slideShow').slick({
    lazyLoad: 'ondemand',
    slidesToShow: 5,
    slidesToScroll: 1,
    infinite: false,
  });
});

当网站加载说:

时,我收到两个错误
GET file://code.jquery.com/jquery-1.11.0.min.js net::ERR_FILE_NOT_FOUND
home.html:8 
GET file://code.jquery.com/jquery-migrate-1.2.1.min.js    
net::ERR_FILE_NOT_FOUND

我是jQuery的新手,我无法弄清楚为什么在使用jQuery CDN时无法找到jQuery。

2 个答案:

答案 0 :(得分:1)

如果您在本地访问它,则必须在脚本引用中添加var addContactPage = require('./../../pages/addContact/addContact_page.js'); module.exports = function(){ this.saveAndReturnGuid = saveAndReturnGuid; function saveAndReturnGuid() { var addContact = new addContactPage(); return addContact.saveButton.click().then(function (alertText) { browser.wait(function () { return browser.switchTo().alert().then( function () {return true;}, function () {return false;} ); }, 3000); var popupAlert = browser.switchTo().alert(); alertText = popupAlert.getText(); popupAlert.dismiss(); return alertText; }); }; }

http:

<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.0.min.js"></script>

答案 1 :(得分:0)

适合我。也许试试:

char password[30];
int lower, upper, number, symbol, i;
lower = upper = number = symbol = 0;

printf("Enter your password: ");
scanf("%s", &password);

int len = strlen(password);

for (i = 0; i <= len; i++) {

    if (isalpha(password[i])){

        if (isupper(password[i])){
            upper++;
        }

        else{
            lower++;
        }
    }

    if (isdigit(password[i])){
        number++;
    }

    else{
        symbol++;
    }
}

if (upper >= 1 && lower >= 1 && number >= 1 && symbol >= 1 && len >=6){

    printf("Your password is good!");

}

if (upper < 1){

    printf("You need an uppercase letter \n");

}

if (lower < 1){

    printf("You need a lowercase letter \n");

}

if (number < 1){

    printf("You need a number \n");

}

if (symbol < 1){

    printf("You need a symbol \n");

}

if (len < 6){

    printf("Your password must be at least 6 characters \n");

}