开发者

Modernizr With Codeigniter

开发者 https://www.devze.com 2023-01-04 14:40 出处:网络
I am having difficulty trying to get modernizer to run with codeigniter. this is what I\'ve done so far.

I am having difficulty trying to get modernizer to run with codeigniter.

this is what I've done so far.

  1. downloaded Modernizr and renamed the file modernizr-1.5.min.txt to modernizr-1.5.min.js

  2. put the JavaScript file in the same directory as my header file is: apppath/views/tops/

  3. included the file in my headings <script src="modernizr-1.5.min.js"></script>

  4. included this in my HTML element <html class="no-js">

  5. just to preserve my sanity I put the JavaScript file modernizr-1.5.开发者_Go百科min.js in my views directory and in the application directory.

I am getting absolutely zero response when I read my page source to see if the has been replaced with the elements that my browser covers the wave modernizr is supposed to work. I have tried this using Firefox and chrome as far as reading the source.

any suggestions? Thank you in advance


why would you put javascript files ito the view folder of your app? i would rather use this path "/media/javascripts/modernizr.js" and then <script src="/media/javascripts/modernizr.js"></script> link it like that. the view folder is only for templates. other thing is that you will never see the changes that javascript does to your page in the pagesource. because it only shows you what html the browser received. and javascript starts to work after the browser received the html. you need to install firebug to see the "live" dom.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号