I have a problem with fancybox. I read a few answers here, but had't found a solution for my problem. I have these scripts loaded in my webpage:
Sripts for fancybox:
<script type="text/javascript" src="fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
<script type="text/javascript" src="fancybox/jquery.fancybox-1.3.4.pack.js"></script>
Other scripts that my page includes:
<script src="assets/js/jquery-1.8.3.min.js"></script>
<script src="assets/js/jquery.plugins.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/plugins/selectnav/selectnav.min.js"></script>
<script src="assets/plugins/tweet/jquery.tweet.js"></script>
<script src="assets/plugins/fitvids/jquery.fitvids.js"></script>
<script src="assets/plugins/isotope/jquery.isotope.min.js"></script>
<script src="assets/plugins/sharrre/jquery.sharrre-1.3.4.min.js"></script>
<script src="assets/plugins/revolutionslider/js/jquery.themepunch.revolution.min.js"></script>
<script src="assets/js/template.js"></script>
<script src="assets/js/customizer.js"></script>
Problem is that when I have all of these fancy box won't work. I tryed many combinations and found that the only possible for a fancbox to work is to remove script 'jquery-1.8.3.min.js' from page. If I remove it dropdown menu is not working, and the fancybox does.
Where is the problem? I just copied scripts, not a body code, because I toought it's not nessesary.
Related
I have a problem with this site: http://www.gm-impianti.srl/index.html
when I open the site, and from the menu, i open the "portfolio" page, the instagram plugin is not loaded. If I load the page again, the plugin works. why?
this is the js that is not loaded on the first start:
<script src = "https://apps.elfsight.com/p/platform.js"> </script>
thanks in advance
Change the order of your scripts from
<script src="js/plugins.js"></script>
<script src="js/scripts.js"></script>
<script src="https://apps.elfsight.com/p/platform.js" ></script>
to
<script src="https://apps.elfsight.com/p/platform.js" ></script>
<script src="js/plugins.js"></script>
<script src="js/scripts.js"></script>
my imports for modal are
<script type="text/javascript" src="../../resources/js/checkbox_hide.js"></script>
<script type="text/javascript" src="../../resources/js/jquery.js"></script>
<script type="text/javascript" src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<script type="application/javascript" src="../../resources/js/bootstrap.min.js"></script>
and i am calling it as..
function showPandLModal(){
$('#vehiclePandLModal').modal('toggle');
};
i am making some small error but unable to find it.
Change
<script type="text/javascript" src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
to
<script type="text/javascript" src="https://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
Add this too:
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
i used "js" imports from other page where modal was working. It worked but i am still not sure about what imports are needed for modal. Any Explanation is welcomed.
In my website i have few jquery because i have a few funcions (sticky header, anchors and animations). I want to know is it neccessery to include all of it or i can include only one or two ?
Here is my included jquerys
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/modernizr/modernizr-2.7.2.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script src="http://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.1.0.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
You should include the following:
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/modernizr/modernizr-2.7.2.js"></script>
This configuration will only support IE9+
If you need IE7 or IE8, use:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/modernizr/modernizr-2.7.2.js"></script>
Today i wanted to add datepicker() to my page.So I downloaded jqueryui and added then in the sequence below.
<script type="text/javascript" src="js/jquery.js"></script>
<script src="js/superfish.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/retina.min.js"></script>
<script src="assets/validate.js"></script>
<script src="js/jquery.placeholder.js"></script>
<script src="js/functions.js"></script>
<script src="js/wizard_func.js"></script>
<script src="check_radio/jquery.icheck.js"></script>
<script type="text/javascript" src="js/navi_artstyle.js"></script>
<script type="text/javascript" src="js/jquery-ui.js"></script>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="js/mapmarker.jquery.js"></script>
<script type="text/javascript" src="js/mapmarker_func.jquery.js"></script>
It didn't work. It took me whole day to figure out what is wrong. it was the SEQUENCE of js files included!!! To work my code i had to include them like bellow.("jquery.js" position had to change)
<script src="js/superfish.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/retina.min.js"></script>
<script src="assets/validate.js"></script>
<script src="js/jquery.placeholder.js"></script>
<script src="js/functions.js"></script>
<script src="js/wizard_func.js"></script>
<script src="check_radio/jquery.icheck.js"></script>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/navi_artstyle.js"></script>
<script type="text/javascript" src="js/jquery-ui.js"></script>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="js/mapmarker.jquery.js"></script>
<script type="text/javascript" src="js/mapmarker_func.jquery.js"></script>
Can some one explain this please. Please give me a Source so I wont make this mistake again.
Normal jQuery (core)
jQuery migrate if you have
jQuery UI
jQuery mobile
Scripts that need jQuery / scripts that are jQuery plugins
Other scripts like bootstrap
You own scripts depending which is needed first
First you have to include normal jQuery library.After that You have to include other jquery library like jquery ui and jquery mobile and all finally you have to include your own javascript files.
As mentioned in comments you have to mention the scripts in the order you use that.
Simply anything used Jquery will goes after jQuery, anything that depends on jQuery UI goes after jQuery UI etc.
I have checked a lot of forums, but i did't find a solution.
site -> http://dszerszen.pl/domi/
and this code
<script type="text/javascript">
$(document).ready(function(){
$(".info").tytabs({
tabinit:"1",
fadespeed:"fast"
});
});
</script>
icon switcher dosent work
Simply rearrange your scripts in this order:
<script type="text/javascript" src="jquery.min.js"></script>
<script src="modernizr.custom.63321.js"></script>
<script type="text/javascript" src="tytabs.jquery.min.js"></script>
<script src="scrolltop.js" type="text/javascript"></script>
<script async src="analytics.js"></script>
The jQuery core library should be included first followed by the other plugin code.
You have defined scrollTop.js in two places.
One is at the top of css files. And jquery is not loaded before that. That's why you are getting error.
<title>Smykke Galleriet</title>
<link type="text/css" rel="stylesheet" href="stylesheet.1.css" />
<script src="scrolltop.js" type="text/javascript"></script>
Remove that line and it will work properly.