i just want to know why if in include the jquery mobile 1.4.5, all my links didn t work. But if i include 1.3.1, the links works (but not my button on the left header).
here my website: Fric-Afrique
<script type="text/javascript"
src="http://fric-afrique.fr/ext/jquery_1.11.4/jquery.min.js"></script>
<script type="text/javascript"
src="http://fric-afrique.fr/ext/jquery.mobile-1.4.5_new/demos/_assets/js/index.js"></script>
<script type="text/javascript"
src="http://demos.jquerymobile.com/1.4.5/js/jquery.mobile-1.4.5.min.js"></script>
thank you for your help
Related
At the point in Ch. 5 of the Hartl tutorial where he's showing off CSS/SCSS/Bootstrap styling for the first time (ch. 5.1.2), you're supposed to see the page transformed from an unstyled HTML page to a nifty styled page. But I wasn't seeing the change. It stayed unstyled.
I typed in the listings carefully (and even copied and pasted them from the website, just to be sure, after encountering this problem), tried switching to different gem version numbers (as other advice on similar problems said to do), etc.
Then I decided to insert in my application.html.erb layout the <link> to the Bootstrap CDN, as well as <div class="bootstrap-fluid"> (which I'm glad I learned from FreeCodeCamp) and that fixed the problem:
<head>
...
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<body>
<div class="container-fluid">
...
</div>
</body>
Apparently I had done nothing wrong otherwise...my guess is that the bootstrap-sass gem (or some other gem) was not supplying this information correctly.
I'm concerned that if I've put this code in my layout, stuff might break later on. Like, it's supposed to work without what I added, right? Any ideas how to make it work the way Hartl wants it to work?
UPDATE: Ugh. Typo! It turns out that I had misnamed custom.css.scss to custom.css.cscc. Well, that'll do it!
The only reason the Bootstrap CDN link helped was that my layout made use of some Bootstrap. When I started adding custom CSS to custom.css.cscc (sic!) I knew the file wasn't even being read. Lesson learned...type even more carefully.
For some reason turbolinks is causing the AddThis widget not to appear when the page is loaded for the first time. If you click refresh it will appear. When I remove turbolinks there is no problem with AddThis appearing. Why is turbolinks causing this?
In application.html.erb:
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-583665b72cde5f5c"></script>
In show.html.erb
<div class="addthis_inline_share_toolbox"></div>
Maybe the problem is you didn't use the javascript_include_tag
Turbolinks has a caching mechanism that can cause some JS libs not to behave properly, look here
I have lot of datetimepicker in my module. Currently I am using bootstrap datetimepicker v3 version. Some issues are there here. So I will try to use the next version. In v4 version lot of problem has been resolved. So please kindly help me what are the js and css files I have include in my jsp page for using the bootstrap datetimepicker v4 version.
You can follow the installation instructions and manual and demos.
Quoting:
Minimal Requirements
jQuery
Moment.js
Bootstrap.js (transition and collapse are required if you're not using the full Bootstrap)
Bootstrap Datepicker script
Bootstrap CSS
Bootstrap Datepicker CSS
Locales: Moment's locale files are here
Scripts needed:
<script type="text/javascript" src="/path/to/jquery.js"></script>
<script type="text/javascript" src="/path/to/moment.js"></script>
<script type="text/javascript" src="/path/to/bootstrap/js/transition.js"></script>
<script type="text/javascript" src="/path/to/bootstrap/js/collapse.js"></script>
<script type="text/javascript" src="/path/to/bootstrap/dist/bootstrap.min.js"></script>
<script type="text/javascript" src="/path/to/bootstrap-datetimepicker.min.js"></script>
CSS styles
<link rel="stylesheet" href="/path/to/bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css" />
In my rails 3.1 app, while deploying, the assets is compiled and gets uploaded successfully.
When I visit the app, the css and js files are referenced but the server give back 404.
<link href="/assets/application-f997bad128b3d8a92ed5619470851dab.css" media="screen" rel="stylesheet" type="text/css" />
<script src="/assets/application-d7eac22b3bc8b4e3620abb21f59a5faa.js" type="text/javascript"></script>
Looking on the server, the fingerprint that is printed on the html markup doesn't match so the server returns 404.
But I wonder how the hell this happens.
So, what are the factors that change the fingerprinting of the manifest files?
Maybe your server wasn't reloaded. I've experienced this issue when Unicorn didn't switch over after sending the USR2 signal to the process. I had to manually kill and restart the process to get it going again.
I'm a rails newbie trying to follow a howto on how to perform some Ajax calls (after switching to jQuery), but I've run into a problem.
Whenever I trigger the ajax code (new Ajax.Request()), I get "Ajax is not defined" in firebug. Anyone with more skills than me know what's up here?
update:
For anyone else having this problem, the code that was generating the the above code, was a call to remote_function()
What I have done to set things up:
Added "gem 'jquery-rails', '>= 1.0.12'" to my gemfile, and run bundle install
Run rails generate jquery:install
My public/javascripts/ folder thus has the following files:
application.js
jquery.min.js
jquery-ui.min.js
jquery.js
jquery-ui.js
jquery_ujs.js
The scripts included in my HTML look like this:
<script src="/javascripts/jquery.js?1312911234" type="text/javascript"></script>
<script src="/javascripts/jquery-ui.js?1312911234" type="text/javascript"></script>
<script src="/javascripts/jquery_ujs.js?1312911234" type="text/javascript"></script>
<script src="/javascripts/application.js?1312911234" type="text/javascript"></script>
I'd guess that your tutorial uses Prototype as Ajax.Request is for Prototype, you should be using $.ajax with jQuery. And switching to a jQuery based tutorial might be a good idea too.
You say that you're using remote_function but that's Prototype-specific:
Usage
To be able to use these helpers, you must first include the Prototype JavaScript framework in your pages.
Prototype used to be the default JavaScript library for Rails so I suspect that PrototypeHelper is a leftover. You probably want to look at things like the :remote option on link_to and similar for new code.