I am using twitter Bootstrap nav bar.
I am trying to make the nav bar behave properly for the mobile devices(i.e when the screen size is small).
nav-collapse works fine in this jsfiddle. But for the same code, in the browser when I reduce the window size it does not work. I don't know what seems to be the problem. Please help me.
Edit : included the content of the head
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" type="text/css" media="screen" href="css/screen.css" />
<link rel="stylesheet" type="text/css" media="screen" href="jquery-ui.css" />
<script src = "jquery-1.9.1.js" type = "text/javascript"></script>
<script src = "jquery-ui.js" type = "text/javascript"></script>
<script src = "jquery.validate.js" type = "text/javascript"></script>
<script src = "1.3.1.js" type = "text/javascript"></script>
<link rel="stylesheet" type="text/css" href="bootstrap-wysihtml5.css"/>
<link rel="stylesheet" type="text/css" href="http://jhollingworth.github.com/bootstrap-wysihtml5/lib/css/bootstrap.min.css"></link>
<script src = "bootstrap.min.js" type = "text/javascript"></script>
<link rel="stylesheet" type="text/css" href="http://jhollingworth.github.com/bootstrap-wysihtml5/lib/css/prettify.css"></link>
<link rel="stylesheet" type="text/css" href="http://jhollingworth.github.com/bootstrap-wysihtml5/src/bootstrap-wysihtml5.css"></link>
<link rel="stylesheet" type="text/css" href="css/job.css"/>
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css"/>
Related
I am new to Laravel and working on a product. The issue I am facing is with loading JS and CSS files.
I have placed all the CSS and JS files inside assets folder and accessing them following way :
CSS :
<link href="{{asset('css/bootstrap.min.css')}}" rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="{{asset('css/bootstrap-select.css')}}">
<!-- Font Awesome CSS -->
<link href="{{asset('css/font-awesome.min.css')}}" rel='stylesheet' type='text/css'>
<link href="{{asset('css/ionicons.css')}}" rel="stylesheet" type="text/css">
<!-- Owl carousel -->
<link href="{{asset('css/owl.carousel.css')}}" rel="stylesheet" type="text/css">
<link href="{{asset('css/owl.theme.css')}}" rel="stylesheet">
<link href="{{asset('css/owl.transitions.css')}}" rel="stylesheet" type="text/css">
<!-- Custome CSS -->
<link rel="stylesheet" href="{{asset('css/nanoscroller.css')}}" type='text/css'>
<link href="{{asset('css/jquery.bxslider.css')}}" rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="{{asset('css/menu.css')}}">
<link href="{{asset('css/all.css')}}" rel='stylesheet' type='text/css'>
and
JS :
<!-- JS -->
<script src="{{asset('js/jquery-1.12.0.min.js')}}"></script>
<script src="{{asset('js/bootstrap.min.js')}}"></script>
<script src="{{asset('js/bootstrap-select.js')}}"></script>
<script type="text/javascript" src="{{asset('js/jquery.nanoscroller.js')}}"> </script>
<script defer src="{{asset('js/bx.js')}}"></script>
<script src="{{asset('js/jquery.mobile.custom.min.js')}}"></script>
<script src="{{asset('js/menu.js')}}"></script>
<script src="{{asset('js/owl.carousel.js')}}" type="text/javascript"> </script>
<script src="{{asset('js/custom.js')}}"></script>
This is exact the same way as it was working fine with the default js & css files come with fresh laravel installation like this :
Default CSS & JS (working) :
<link href="{{asset('/css/app.css')}}" rel="stylesheet">
<script src="{{asset('/js/app.js')}}"></script>
What I am missing here ? Do I have to use the gulp and compile all of js and css into default app.css and app.js files ?
Thanks
This points to the public dir not to the assets dir, move your files to public/css and public/js, use assets dir when your are using gulp.
If you would like to combine some plain CSS stylesheets into a single file, you may use the styles method. Paths passed to this method are relative to the resources/assets/css directory and the resulting CSS will be placed in public/css/all.css :
elixir(function(mix) {
mix.styles([
'normalize.css',
'main.css'
]);
});
for js use mix.scripts
Add /
<link href="{{asset('/css/bootstrap.min.css')}}" rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="{{asset('/css/bootstrap-select.css')}}">
<!-- Font Awesome CSS -->
<link href="{{asset('/css/font-awesome.min.css')}}" rel='stylesheet' type='text/css'>
<link href="{{asset('/css/ionicons.css')}}" rel="stylesheet" type="text/css">
<!-- Owl carousel -->
<link href="{{asset('/css/owl.carousel.css')}}" rel="stylesheet" type="text/css">
<link href="{{asset('/css/owl.theme.css')}}" rel="stylesheet">
<link href="{{asset('/css/owl.transitions.css')}}" rel="stylesheet" type="text/css">
<!-- Custome CSS -->
<link rel="stylesheet" href="{{asset('/css/nanoscroller.css')}}" type='text/css'>
<link href="{{asset('/css/jquery.bxslider.css')}}" rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="{{asset('/css/menu.css')}}">
<link href="{{asset('/css/all.css')}}" rel='stylesheet' type='text/css'>
And JS
<script src="{{asset('/js/jquery-1.12.0.min.js')}}"></script>
<script src="{{asset('/js/bootstrap.min.js')}}"></script>
<script src="{{asset('/js/bootstrap-select.js')}}"></script>
<script type="text/javascript" src="{{asset('/js/jquery.nanoscroller.js')}}"> </script>
<script defer src="{{asset('/js/bx.js')}}"></script>
<script src="{{asset('/js/jquery.mobile.custom.min.js')}}"></script>
<script src="{{asset('/js/menu.js')}}"></script>
<script src="{{asset('/js/owl.carousel.js')}}" type="text/javascript"> </script>
<script src="{{asset('/js/custom.js')}}"></script>
I just follow froala documentation and mix it with current layout using metronic.
Here is my css order.
<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=all" rel="stylesheet" type="text/css"/>
<link href="assets/global/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
<link href="assets/global/plugins/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" type="text/css"/>
<link href="assets/global/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<link href="assets/global/css/components-md.css" id="style_components" rel="stylesheet" type="text/css"/>
<link href="assets/global/css/plugins-md.css" rel="stylesheet" type="text/css"/>
<link href="assets/admin/layout2/css/layout.css" rel="stylesheet" type="text/css"/>
<link href="assets/admin/layout2/css/themes/grey.css" rel="stylesheet" type="text/css" id="style_color"/>
<link href="assets/admin/layout2/css/custom.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" type="text/css" href="assets/coeg-editor/css/froala_editor.min.css" />
<link rel="stylesheet" type="text/css" href="assets/coeg-editor/css/froala_style.min.css" />
and here is my JS order
<script src="assets/global/plugins/jquery.min.js" type="text/javascript"></script>
<script src="assets/global/plugins/jquery-migrate.min.js" type="text/javascript"></script>
<script src="assets/global/plugins/jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
<script src="assets/global/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="assets/global/scripts/metronic.js" type="text/javascript"></script>
<script src="assets/admin/layout2/scripts/layout.js" type="text/javascript"></script>
<script type="text/javascript" src="assets/coeg-editor/js/froala_editor.min.js"></script>
<script>
$(function() {
Metronic.init(); // init metronic core componets
Layout.init(); // init layout
$('a[href="{{ Request::url() }}"]').parent().addClass('active');
$('textarea#content').editable({inlineMode: false});
});
</script>
and I get Uncaught TypeError: undefined is not a function right at the $('textarea#content').editable({inlineMode: false});
But there is no error if I comment $('textarea#content').editable({inlineMode: false}); section.
How I can fix it ?
See https://www.froala.com/wysiwyg-editor/v2.0/docs/migrate-from-v1 for using
froalaEditor()
instead of
editable()
never mind the html which contain example still using v1 syntax instead of v2 :D
My pages are not coming by using ng-view in angular.js.When i am typing the url http://localhost:8888/dashboard the pages should come.I am explaining my code below.
view/dashboard.html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" ng-app="adminDashboard">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Welcome to Odia Doctor Admin Panel</title>
<link href='http://fonts.googleapis.com/css?family=Roboto:400,300,500,700,900' rel='stylesheet' type='text/css' />
<link href='http://fonts.googleapis.com/css?family=Lato:300,400,700' rel='stylesheet' type='text/css' />
<link rel="shortcut icon" href="img/favicon.png" type="image/x-icon">
<!-- Styles -->
<link rel="stylesheet" href="font-awesome-4.2.0/css/font-awesome.css" type="text/css" /><!-- Font Awesome -->
<link rel="stylesheet" type="text/css" media="all" href="css/daterangepicker-bs3.css" /><!-- Date Range Picker -->
<link rel="stylesheet" href="css/bootstrap.css" type="text/css" /><!-- Bootstrap -->
<link rel="stylesheet" href="css/jquery-jvectormap.css" type="text/css" /><!-- Vector Map -->
<link rel="stylesheet" href="css/owl.carousel.css" type="text/css" /><!-- Carousal -->
<link rel="stylesheet" href="css/style.css" type="text/css" /><!-- Style -->
<link rel="stylesheet" href="css/responsive.css" type="text/css" /><!-- Responsive -->
</head>
<body ng-view>
</body>
<script src="js/angular.min.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="js/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript" src="js/modernizr.js"></script>
<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
<script type="text/javascript" src="js/script.js"></script>
<script type="text/javascript" src="js/bootstrap.js"></script>
<script type="text/javascript" src="js/enscroll.js"></script>
<script type="text/javascript" src="js/grid-filter.js"></script>
<script type="text/javascript" src="app/routes/dashboard-route.js"></script>
<script type="text/javascript" src="app/controller/dashboard-controller.js"></script>
</html>
public/app/routes/dashboard-route.js:
var dashboard=angular.module('adminDashboard',[]);
dashboard.config(['$routeProvider',
function($routeProvider){
$routeProvider.
when('/dashboard',{
templateUrl:'app/view/dashboard-partial.html',
controller:'dashboard-controller'
});
}
])
public/app/controller/dashboard-controller.js:
var dashboard=angular.module('adminDashboard',[]);
dashboard.controller('dashboard-controller',function($scope){
$.ajax({
type:'GET',
url:"/getAdminData",
success: function(data){
$scope.firstname=data.firstname;
$scope.lastname=data.lastname;
$scope.adminImage=data.image;
},
error: function(data){
console.log(data);
}
});
});
Please help me to resolve this issue so that the template will successfully display.I am also using node.js for client server architecture.
It looks like your dashboad-route.js is using templateUrl:'app/view/dashboard-partial.html', but the name of your HTML file is view/dashboard.html. Change templateUrl to app/view/dashboard.html (or whatever the correct path is) and see if that fixes things.
One problem is that if you use $.ajax to do scope changes angular is unaware of them so you need to use $apply() to tell angular to run digest scycle.
For this reason I suggest you don't use $.ajax and use angular $http
I'm having trouble with my bootstrap tooltip. If you visit the page from another page, the tooltip will not have the bootstrap styling. But if the page is reloaded, the styling works fine.
This is my rendered head when you first visit a page:
<link href="/assets/custom.css?body=1" media="screen" rel="stylesheet" />
<link href="/assets/bootstrap.css?body=1" media="screen" rel="stylesheet" />
<link href="/assets/bootstrap.min.css?body=1" media="screen" rel="stylesheet" />
<link href="/assets/font-awesome-ie7.css?body=1" media="screen" rel="stylesheet" />
<link href="/assets/font-awesome-ie7.min.css?body=1" media="screen" rel="stylesheet" />
<link href="/assets/font-awesome.css?body=1" media="screen" rel="stylesheet" />
<link href="/assets/font-awesome.min.css?body=1" media="screen" rel="stylesheet" />
<link href="/assets/style.css?body=1" media="screen" rel="stylesheet" />
<link href="/assets/style.min.css?body=1" media="screen" rel="stylesheet" />
<link href="/assets/social-share.css?body=1" media="screen" rel="stylesheet" />
<link href="/assets/index.css?body=1" media="screen" rel="stylesheet" />
<link href="/assets/application.css?body=1" media="screen" rel="stylesheet" />
<script src="/assets/vendor/modernizr.js?body=1"></script>
The head stays the same if the page is reloaded...
Has anyone had this problem before?
I am just importing the below javascript file and css but when i run this page the ajax-loader just keeps on spinning.
Note: there is no body or content in the file at all other than what is mentioned below.
Any idea why the ajax-loader.gif spins ?
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="js/jquery.mobile-1.4.2.min.css">
<link rel="stylesheet" type="text/css" href="js/jquery.mobile.external-png-1.4.2.css">
<link rel="stylesheet" type="text/css" href="js/jquery.mobile.external-png-1.4.2.min.css">
<link rel="stylesheet" type="text/css" href="js/jquery.mobile.icons-1.4.2.css">
<link rel="stylesheet" type="text/css" href="js/jquery.mobile.icons-1.4.2.min.css">
<link rel="stylesheet" type="text/css" href="js/jquery.mobile.inline-png-1.4.2.css">
<link rel="stylesheet" type="text/css" href="js/jquery.mobile.inline-png-1.4.2.min.css">
<link rel="stylesheet" type="text/css" href="js/jquery.mobile.inline-svg-1.4.2.css">
<link rel="stylesheet" type="text/css" href="js/jquery.mobile.inline-svg-1.4.2.min.css">
<link rel="stylesheet" type="text/css" href="js/jquery.mobile.structure-1.4.2.css">
<link rel="stylesheet" type="text/css" href="js/jquery.mobile.structure-1.4.2.min.css">
<link rel="stylesheet" type="text/css" href="js/jquery.mobile.theme-1.4.2.css">
<link rel="stylesheet" type="text/css" href="js/jquery.mobile.theme-1.4.2.min.css">
<link rel="stylesheet" type="text/css" href="js/jquery.mobile-1.4.2.css">
<script src="js/jquery-1.11.0.min.js"></script>
<script src="js/jquery.mobile-1.4.2.js"></script>
<script src="js/jquery.mobile-1.4.2.min.js"></script>
</head>
<body>
</body>
</html>
.However when i try the below links it works fine without the loader spinning.
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.1/jquery.mobile-1.4.1.min.css">
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.1/jquery.mobile-1.4.1.min.js"></script>
why two jquery mobiles just add one:
<script src="js/jquery-1.11.0.min.js"></script>
<script src="js/jquery.mobile-1.4.2.js"></script> //<---either this
<script src="js/jquery.mobile-1.4.2.min.js"></script>//<--or this
you have to pick only one of it, so update to this:
<script src="js/jquery-1.11.0.min.js"></script>
<script src="js/jquery.mobile-1.4.2.min.js"></script>
and you have loaded all the non-minified and minified css files too.