Code only works on jsfiddle

前端 未结 2 1603
迷失自我
迷失自我 2021-01-27 04:19

In this question I asked, how I can generate shades of one color responsive to the number of div\'s. @DonJuwe came up with a perfectly working solution and demo: http://jsbin.co

2条回答
  •  -上瘾入骨i
    2021-01-27 04:38

    As per snapshot, You are using

    
    

    Replace it with

    
    

    You are using protocol less Urls, i.e. //code.jquery.com/jquery-1.9.1.js, When you open a your html file like file:// then jQuery is not loaded thus desired result is not achieved.

    However, if you test your html file like http://localhost/yourfile.html you will get the desired result.

    Note: Use // instead of http:// when you want to inherit the protocol from the page

提交回复
热议问题