I am facing a problem that when i reload my page all the child menu are expand and after reload they are all well.why child menu are expand.
my site link is
www.thesouq.com
Try putting js file of menu right after jquery
<script type="text/javascript" src="scripts/jquery.js"></script>
<script type="text/javascript" src="scripts/jquery.ui.js"></script>
<script type="text/javascript" src="scripts/jquery.menu.js"></script>
<script type="text/javascript" src="scripts/jquery.menu.hover.js"></script>
try removing this block also
<script>
window.onload = function(){
include ("scripts/jquery.menu.js");
}
</script>
I have check it using firebug you menu call is very late since doc is not ready.
Please optimize your page, check out Yslow, it will help you a lot
Related
I setup bootstrap files in public folder. Routes are as below:
<link rel="stylesheet" href="{{url('assets/css/bootstrap.min.css')}}">
<script type="text/javascript" src="{{url('assets/js/bootstrap.min.js')}}"></script>
<script type="text/javascript" src="{{url('assets/js/jquery.min.js')}}"></script>
<script type="text/javascript" src="{{url('assets/js/tether.min.js')}}"></script>
no problem with this. I can see connection to files when I check the source code. and also bootstrap fonts are active but, when I try to copy some examples from bootstrap website. It doesn't display properly. For example I copied navigation bar to my main.blade But it doesn't show up.
What is causing this? Any idea?
It s big screen but showing responsive hamburger icon?
You should add jquery before bootstrap min js file
<link rel="stylesheet" href="{{url('assets/css/bootstrap.min.css')}}">
<script type="text/javascript" src="{{url('assets/js/jquery.min.js')}}"></script>
<script type="text/javascript" src="{{url('assets/js/tether.min.js')}}"></script>
<script type="text/javascript" src="{{url('assets/js/bootstrap.min.js')}}"></script>
The order in which you add javascript in HTML page is important. In this case since bootstrap.min.js uses jquery.min.js jquery must be added first. So when bootstrap loads and looks for jquery it finds it.
But if one script does not depend on another then you can add them in any order.
So add jquery.min.js first then anything that uses jquery(like bootstrap) after it.
I'm working in an PHP coded site. In here I want to add the jQuery plugin Barousel. I tested in a HTML page outside my site and it works fine. But when I add the code in the page where it has to work (PHP), it isn't working.
In chrome I got the next message;
Uncaught Type Error: object#<object> has no method 'barousel'
This is the page.
The image has to be a carousel with text.
Please can anyone help me; I really don't know what to do.
Your page head has loaded jquery.js twice.
The second load will overwrite the first, and $.fn.barousel will no longer be defined.
<script type="text/javascript" src="jquery.js"></script>
<script src="barousel/js/jquery.barousel.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
//BAROUSEL - ITEM NAVIGATION
jQuery('#barousel_itemnav').barousel({
manualCarousel: 0,
slideDuration: 3000
});
});
</script>
<!-- remove this -->
<script type="text/javascript" src="jquery.js"></script>
<!-- remove this -->
scenario
I have a PHP if statement to test if a user is logging in for the first time ever. This then displays, a demo in a greybox popup box.
Sadly when the box loads in IE, the content of the website doesn't. This means when I user closes the box, they are left the with background.
Code - I'm now using PHP include.
greybox.php
<?php if ($fli == 0) {echo " <script type='text/javascript'>
window.onload = function() {
GB_showCenter('Your first login', '../video.php');
};
</script> ";} else echo "";?>
<!-- GB scrip -->
<script type="text/javascript">
var GB_ROOT_DIR = "greybox/";
</script>
<script type="text/javascript" src="greybox/AJS.js"></script>
<script type="text/javascript" src="greybox/AJS_fx.js"></script>
<script type="text/javascript" src="greybox/gb_scripts.js"></script>
<link href="greybox/gb_styles.css" rel="stylesheet" type="text/css" />
<!-- GB -->
RELEVANT Script on main site
<?php $fli = $_SESSION["USER"]["fli"]; ?>
<?php include "greybox.php" ?>
I would deeply appreicate any help at all please! :)
Never worked with it but what if you try the full url for a test.
How does IE then reacts?
Alternative could be jQueryIU, you can create a dialog for the first login.
Also if I restart my browser do I have to see the video again?
If you save the last login in the DB you can use that information to show the video.
Good luck.
I have a php page how can i show another window using extjs? So code i have so far is like this:
Can anyone show me how can this be done? I only want this done by extjs please dont tell other alternatives.
<script type="text/javascript" charset="utf-8" src="http://cdn.sencha.io/ext-4.0.2a/ext-all.js">
</script>
<script>
window = new Ext.Window({layout: 'border'}).show()
</script>
Bellow is the code to show an Ext window. Tested and it is working.
<link rel="stylesheet" type="text/css" href="http://cdn.sencha.io/ext-4.0.2a/resources/css/ext-all.css" />
<script type="text/javascript" src="http://cdn.sencha.io/ext-4.0.2a/ext-all.js"></script>
<script type="text/javascript">
Ext.onReady(function(){
var window = Ext.create('Ext.Window',{
title: 'Hello',
height:100,
width:100
});
window.show();
})
</script>
Working on jsFiddle
new Ext.Window({
title:'Hello World Window',
html:'Am I the right size?',
height:Ext.getBody().getViewSize().height,
width:Ext.getBody().getViewSize().width*0.8 //80%
}).show();
ExtJS open window with max height
I have installed the TinyMce blog editor to my site. When the compose blog page loads a I get a pop up that has the yield sign and says "Developer Key Validation Failed" Anyone know what this is?
<script type="text/javascript" src="javascripts/jquery/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="http://www.cysticlife.org/javascripts/jquery/jquery.corners.min.js"></script>
<script type="text/javascript" src="plugins/tinymce/tiny_mce.js"></script>
<script type="text/javascript" src="javascripts/system/config.js"></script>
<script src="http://www.google.com/jsapi?key=YOUR_API_KEY"></script>
<script src="http://gdata-javascript-client.googlecode.com/svn/trunk/samples/blogger/blog_this/blog_this.js"></script>
<div id="blog_this"></div>
I think that's a Google Data API error message; if so it's unrelated to TinyMCE. Are you using any Google data in the same page? If so, check your API key.