I am trying to make the popover feature that is included in bootstrap which Twitter has provided. I have been trying to make it work for a while now and am totally burnt out of ideas on making it work, here is a sample of what I currently have for it http://jsfiddle.net/JPf9y/1
HTML
popover
Javascript
$("a[rel=popover]").popover();
It won't work when I click it, I checked to make sure my directory is written correctly.
Thank you!
You need to include the bootstrap javascript, bootstrap css, and jQuery javascript in your page. They can be downloaded here:
http://twitter.github.com/bootstrap/assets/bootstrap.zip
http://code.jquery.com/jquery-1.9.1.js
For the JSFiddle you can include jQuery under the Frameworks and Extensions menu on the left and other files, such as bootstrap's js and css, using the External Resources tag on the left side. For your fiddle I referenced the .js and .css files from http://cdnjs.com/.
http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.1/js/bootstrap.min.js
http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.1/css/bootstrap.min.css
Updated JSFiddle
Related
I created a cookie banner with some HTML, CSS and Javascript.
My question is how can I add these files within Wordpress to make the banner works on the whole site?
I know I could just use a Wordpress plugin to generate a cookie banner, but I was wondering if it was possible to integrate my code.
Thanks
These are the following methods:
You may use the plugin "Header and Footer" (This plugin have different TABS like html, CSS, JavaScript) and add your whole in this plugin. So Your code work in whole WordPress website.
First, you need to install and activate the SyntaxHighlighter Evolved plugin. For more details, see our step by step guide on how to install a WordPress plugin.
Upon activation, you can go ahead and edit the blog post where you want to display the code.
Iam trying to create a accordion from the bootstrap website in React. Iam following this website https://getbootstrap.com/docs/4.1/components/collapse/#accordion-example
I copied their example code and it looks exactly just as the example on the website but the problem is when I click on the accordion nothing happends, it doesn't expand or close. Is there suppose to be a onClick function somewhere in the code that needs to be included?
you need to copy the JS as well as the css code from bootstrap lib.
i suggest to use code from my google search bellow, create a component and just adapt the css style to bootstrap
https://www.google.it/search?q=accordion+example+jsfiddle&oq=accordion+example+jsf&aqs=chrome.1.69i57j0l5.12453j0j1&sourceid=chrome&ie=UTF-8
actually is very easy to build it
Forgive me if I'm totally wrong here, as I am fairly new to web development- but I've used that accordion before and simply copying and pasting their code should do the trick, provided you have added the proper link tags from their "Getting Started" section in documentation set in your index.html (not just CSS but all of the JS links, too).
I hope this helps!!
When I download a jquery ui theme via themeroller I get a jquery-ui-1.10.4.custom.js file instead of the standard jquery-ui-1.10.4.js file that comes with a regular jquery ui download.
I am trying to understand what is changing in jqueryui.js file from theme download to download. I was under the impression that nothing should change the .js file and that themes were just .css. Is this not the case?
I did not apply any customizations to the theme I downloaded (starter theme) and then added just the .css to a page with the regular jqueryui linked up and the page didn't work. When I tried with other themes though such as the hot-sneaks I did not have this problem.
I am asking this question because I would like to link to the jqueryui on a cdn and I just want to use the vanilla version. Is this possible?
Thank you for your help.
I don't think there is anything different other than the name. You could try running them though a compare tool to see if there are any differences.
Here is an online Comparer http://www.diffnow.com/
Right, i've looked around and can't seem to find an answer to this problem.
I'm running Expression Engine Core (the latest version), and I am building a template. I have built the template using Bootstrap and some other bits of code. I'm having a problem with using prettyPhoto within my template. I have a button which is calling a prettyPhoto modal window. My static HTML site works fine with this but there seems to be some sort of conflict somewhere. All my js files and css files link fine, but for some reason or another the js doesn't work for my prettyPhoto. The code i'm using is:
Need Help? <i class="icon-help-circle"></i><div id="maphelp" class="hide">text goes in here</div>
But I can't for the life of me work out why this isn't working. I've tried making the class= into a rel= but that still doesn't do anything. I've used the code from the http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/ with the section on inline content.
I have also done the fix within the help pages to make sure that its is active. Still nothing happens...
Can anyone help me?
Have you tried moving your prettyPhoto.js to the bottom of your code perhaps inside the footer or better yet, below the footer.
I usually create an embeds template where I place all of my js, xml, css files and call out the embeds like so
<script src="{path="embeds/jsfile"}"></script>
this way it allows me to move the files all over the place in my visual template.
another is to use the no conflict
<script type="text/javascript">
$.noConflict();
// Code that uses other library's $ can follow here.
</script>
I hope this helps.
I´ve tested with several files, and decided to hotlink every single css and js file that I think is needed.
But still the javascript won´t work.
I´ve added 4 files of Twitter´s Bootstrap at: http://jsfiddle.net/PS3LH/
If I paste inside the css area the css required it seems to work, but the css file is already added, so I don´t know why it doesn´t work...
Thanks for your help!
Rosamunda
Make sure you have JQuery loaded first, then tooltip, then popover.
http://jsfiddle.net/QLvUj/
Your bootstrap CSS had the wrong URL too. Above is a working example.