problema caricamento condizionale slideshow FlexSlider

giuliano75

Nuovo Utente
12 Lug 2013
14
0
0
ho un problema con uno script che dovrebbe caricare in modo condizionalela slideshow a secondo della risoluzione pero non mi funziona non sono molto esperto di javascript.
Ho anche un problema sulla scritta menu che si vede quando riduci la pagina dovrebbe essere bianca pero ho un effetto di hover che io non ho messo questa e la pagina www.giuliano75.altervista.org

in attesa di un vostro aiuto

HTML:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
 
    <!-- Mobile viewport optimized: j.mp/bplateviewport -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
   <!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <title>Responsive Menu animato con effetto Slide Down</title>
   
    
<title>sito giuliano</title>
<!-- Style -->
<link rel="stylesheet" type="text/css" href="css/master.css">
<link rel="stylesheet" type="text/css" href="font/style.css">
<!--script js-->
<script type="text/javascript" src="js/respond.min.js"></script>
<script type="text/javascript" src="js/modernizr-2.0.6.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src=src="js/jquery-1.9.0.min.js"><\/script>')</script>


<!-- Flexlider -->
<script type="text/javascript"  src="js/jquery.flexslider-min.js"></script>
<script type="text/javascript">
$(window).load(function() {
  $('.flexslider').flexslider({
    animation: 'fade',
    slideshow: true,
    controlNav: true,
    directionNav: false
  });
});
</script>
<script type="text/javascript">
var caricaFlexslider = function() {
  $(".flexslider").load("flexslider.html");
};
</script>
<!-- Fine Flexslider -->

<!--script navigazione-->
	<script>
		$(function() {
			var pull 		= $('#pull');
				menu 		= $('nav ul');
				menuHeight	= menu.height();

			$(pull).on('click', function(e) {
				e.preventDefault();
				menu.slideToggle();
			});

			$(window).resize(function(){
        		var w = $(window).width();
        		if(w > 320 && menu.is(':hidden')) {
        			menu.removeAttr('style');
        		}
    		});
		});
	</script>
<!--fine script navigazione--> 
<!--fine js-->
</head>

<body>


<!--inizio header-->
<header>

<!--inizio navigazio-->
	<nav class="clearfix">
		<ul class="clearfix">
<li id="home" ><a href="#"><span class="icon"><i aria-hidden="true" class="icon-home"></i></span><span>HOME</span></a></li>
<li ><a href="#"><span class="icon"><i aria-hidden="true" class="icon-user"></i></span><span>ABOUT</span></a></li>
<li ><a href="#"><span class="icon"><i aria-hidden="true" class="icon-quill"></i></span><span>WORKS</span></a></li>
<li ><a href="#"><span class="icon"><i aria-hidden="true" class="icon-mobile"></i></span><span>CONTACT</span></a></li>
</ul>
		
		<a href="#" id="pull">Menu</a>
	</nav>
</header> 
<!--fine header-->
<!-- Inizio slideshow contenuti in evidenza -->
    <div id="inevidenza" class="flexslider">
      
    </div>
    <!-- Fine slideshow contenuti in evidenza -->

<!-- Carica lo slideshow se la finestra é larga più di 768px -->
    <script type="text/javascript">
      if (document.documentElement.clientWidth >= 768) {
       caricaFlexslider();
      }
    </script>
    </script>
    <!-- Fine caricamento slideshow -->

 

</body>
</html>
Codice:
/* 
 * HTML5 ✰ Boilerplate
 *
 * What follows is the result of much research on cross-browser styling. 
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 *
 * Detailed information about this CSS: h5bp.com/css
 * 
 * ==== Normalize ==========================================================
 */


/* =============================================================================
   HTML5 display definitions
   ========================================================================== */

article, aside, details, figcaption, figure, footer, header, hgroup, nav, section {display: block;}
audio, canvas, video {display: inline-block; *display: inline; *zoom: 1;}
audio:not([controls]) {display: none;}
[hidden] {display: none;}

/* =============================================================================
   Base
   ========================================================================== */

/*
 * 1. Correct text resizing oddly in IE6/7 when body font-size is set using em units
 * 2. Force vertical scrollbar in non-IE
 * 3. Prevent iOS text size adjust on device orientation change, without disabling user zoom: h5bp.com/g
 */

html {font-size: 100%; overflow-y: scroll; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%;}

body {margin: 0; line-height: 1.231;}

body, button, input, select, textarea {font-family: sans-serif; color: #222;}

/* 
 * Remove text-shadow in selection highlight: h5bp.com/i
 * These selection declarations have to be separate
 * Also: hot pink! (or customize the background color to match your design)
 */

::-moz-selection {background: #3AC3E0; color: #fff; text-shadow: none;}
::selection {background: #3AC3E0; color: #fff; text-shadow: none;}


/* =============================================================================
   Links
   ========================================================================== */

/* Improve readability when focused and hovered in all browsers: h5bp.com/h */
a:hover, a:active {outline: 0;}


/* =============================================================================
   Typography
   ========================================================================== */

abbr[title] {border-bottom: 1px dotted;}

b, strong {font-weight: bold;}

blockquote {margin: 1em 40px;}

dfn {font-style: italic;}

hr {display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0;}

ins {background: #ff9; color: #333; text-decoration: none;}

mark {background: #ff0; color: #333; font-style: italic; font-weight: bold;}

/* Redeclare monospace font family: h5bp.com/j */
pre, code, kbd, samp {font-family: monospace, monospace; _font-family: 'courier new', monospace; font-size: 1em;}

/* Improve readability of pre-formatted text in all browsers */
pre {white-space: pre; white-space: pre-wrap; word-wrap: break-word;}

q {quotes: none;}
q:before, q:after {content: ""; content: none;}

small {font-size: 85%;}

/* Position subscript and superscript content without affecting line-height: h5bp.com/k */
sub, sup {font-size: 75%; line-height: 0; position: relative; vertical-align: baseline;}
sup {top: -0.5em;}
sub {bottom: -0.25em;}


/* =============================================================================
   Lists
   ========================================================================== */

ul, ol {margin: 1em 0; padding: 0 0 0 40px;}
dd {margin: 0 0 0 40px;}
nav ul, nav ol {list-style: none; list-style-image: none; margin: 0; padding: 0;}


/* =============================================================================
   Embedded content
   ========================================================================== */

/*
 * 1. Improve image quality when scaled in IE7: h5bp.com/d
 * 2. Remove the gap between images and borders on image containers: h5bp.com/e 
 */

img {border: 0; -ms-interpolation-mode: bicubic; vertical-align: middle;}

/*
 * Correct overflow not hidden in IE9 
 */

svg:not(:root) {overflow: hidden;}


/* =============================================================================
   Figures
   ========================================================================== */

figure {margin: 0;}


/* =============================================================================
   Forms
   ========================================================================== */

form {margin: 0;}
fieldset {border: 0; margin: 0; padding: 0;}

/* Indicate that 'label' will shift focus to the associated form element */
label {cursor: pointer;}

/* 
 * 1. Correct color not inheriting in IE6/7/8/9 
 * 2. Correct alignment displayed oddly in IE6/7 
 */

legend {border: 0; *margin-left: -7px; padding: 0;}

/*
 * 1. Correct font-size not inheriting in all browsers
 * 2. Remove margins in FF3/4 S5 Chrome
 * 3. Define consistent vertical alignment display in all browsers
 */

button, input, select, textarea {font-size: 100%; margin: 0; vertical-align: baseline; *vertical-align: middle;}

/*
 * 1. Define line-height as normal to match FF3/4 (set using !important in the UA stylesheet)
 * 2. Correct inner spacing displayed oddly in IE6/7
 */

button, input {line-height: normal; *overflow: visible;}

/*
 * Reintroduce inner spacing in 'table' to avoid overlap and whitespace issues in IE6/7
 */

table button, table input {*overflow: auto;}

/*
 * 1. Display hand cursor for clickable form elements
 * 2. Allow styling of clickable form elements in iOS
 */

button, input[type="button"], input[type="reset"], input[type="submit"] {cursor: pointer; -webkit-appearance: button;}

/*
 * Consistent box sizing and appearance
 */

input[type="checkbox"], input[type="radio"] {box-sizing: border-box;}
input[type="search"] {-webkit-appearance: textfield; -moz-box-sizing: content-box; -webkit-box-sizing: content-box; box-sizing: content-box;}
input[type="search"]::-webkit-search-decoration {-webkit-appearance: none;}

/* 
 * Remove inner padding and border in FF3/4: h5bp.com/l 
 */

button::-moz-focus-inner, input::-moz-focus-inner {border: 0; padding: 0;}

/* 
 * 1. Remove default vertical scrollbar in IE6/7/8/9 
 * 2. Allow only vertical resizing
 */

textarea {overflow: auto; vertical-align: top; resize: vertical;}

/* Colors for form validity */
input:valid, textarea:valid {  }
input:invalid, textarea:invalid {background-color: #f0dddd;}


/* =============================================================================
   Tables
   ========================================================================== */

table {border-collapse: collapse; border-spacing: 0;}
td {vertical-align: top;}

/* ==== Non-semantic helper classes ========================================
   Please define your styles before this section.
   ========================================================================== */

/* For image replacement */
.ir {display: block; border: 0; text-indent: -999em; overflow: hidden; background-color: transparent; background-repeat: no-repeat; text-align: left; direction: ltr;}
.ir br {display: none;}

/* Hide from both screenreaders and browsers: h5bp.com/u */
.hidden {display: none !important; visibility: hidden;}

/* Hide only visually, but have it available for screenreaders: h5bp.com/v */
.visuallyhidden {border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px;}

/* Extends the .visuallyhidden class to allow the element to be focusable when navigated to via the keyboard: h5bp.com/p */
.visuallyhidden.focusable:active, .visuallyhidden.focusable:focus {clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto;}

/* Hide visually and from screenreaders, but maintain layout */
.invisible {visibility: hidden;}

/* Contain floats: h5bp.com/q */ 
.clearfix:before, .clearfix:after {content: ""; display: table;}
.clearfix:after {clear: both;}
.clearfix {zoom: 1;}

/* ==== Print styles =======================================================
   Inlined to avoid required HTTP connection: h5bp.com/r
   ========================================================================== */
 
@media print {
  * {background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important;} 
  /* Black prints faster: h5bp.com/s */
  a, a:visited {text-decoration: underline;}
  a[href]:after {content: " (" attr(href) ")";}
  abbr[title]:after {content: " (" attr(title) ")";}
  .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after {content: "";}  /* Don't show links for images, or javascript/internal links */
  pre, blockquote {border: 1px solid #999; page-break-inside: avoid;}
  thead {display: table-header-group;} /* h5bp.com/t */
  tr, img {page-break-inside: avoid;}
  img {max-width: 100% !important;}
  @page {margin: 0.5cm;}
  p, h2, h3 {orphans: 3; widows: 3;}
  h2, h3 {page-break-after: avoid;}
}

/* == Fine HTML5 ✰ Boilerplate == */


.icon-home, .icon-quill, .icon-user, .icon-html5, .icon-css3, .icon-google, .icon-twitter, .icon-facebook, .icon-mobile{
font-family: 'icomoon';
	speak: none;
	font-style: normal;
	font-weight: normal;
	font-variant: normal;
	text-transform: none;
	line-height: 1;
	-webkit-font-smoothing: antialiased;
		}
body{
	font-family: 'helvetica_neueregular', Optima-Regular, Verdana, sans-serif;
	font-size: 62.5%/1,3;
	color: #222;
	background-color: #FFFFFF;
	margin: 0;
    padding: 0;
	}

/* Basic Styles */
nav {
	height: 80px;
	width: 100%;
	background: #a66bbe;
	font-size: 1em;
	position: relative;
	border-bottom: 2px solid #283744;
}
nav ul {
	padding: 0;
	margin: 0 auto;
	width: 600px;
	height: 80px;
}
nav li {
	display: inline;
	float: left;
}
nav a {
	color: #000000;
	display: inline-block;
	width: 100px;
	text-align: center;
	text-decoration: none;
	line-height: 40px;
	
}
nav li a {
	border-right: 1px solid #576979;
	box-sizing:border-box;
	-moz-box-sizing:border-box;
	-webkit-box-sizing:border-box;
}
nav li:last-child a {
	border-right: 0;
}
nav a:hover, nav a:active, #home a {
	color: #ffffff;
}
nav a#pull {
	display: none;
}
.icon{ display:block;}

/*Styles for screen 600px and lower*/
@media screen and (max-width: 600px) {
	nav { 
  		height: auto;
  	}
  	nav ul {
  		width: 100%;
  		display: block;
  		height: auto;
  	}
  	nav li {
  		width: 50%;
  		float: left;
  		position: relative;
  	}
  	nav li a {
		border-bottom: 1px solid #576979;
		border-right: 1px solid #576979;
	}
  	nav a {
	  	text-align: left;
	  	width: 100%;
	  	text-indent: 25px;
  	}
	.icon{display: inline-block;}
}

/*Styles for screen 515px and lower*/
@media only screen and (max-width : 480px) {
	nav {
		border-bottom: 0;
	}
	nav ul {
		display: none;
		height: auto;
	}
	nav a#pull {
		display: block;
		background-color: #283744;
		width: 100%;
		position: relative;
	}
	nav a#pull:after {
		content:"";
		 background-image:url(../immagini/nav-icon.png);
		 background-repeat:no-repeat;
		width: 30px;
		height: 30px;
		display: inline-block;
		position: absolute;
		right: 15px;
		top: 10px;
	}
	.icon{display: inline-block;}
}

/*Smartphone*/
@media only screen and (max-width : 320px) {
	nav li {
		display: block;
		float: none;
		width: 100%;
	}
	nav li a {
		border-bottom: 1px solid #576979;
	}
	.icon{display: inline-block;}
}

/* FlexSlider Default Theme
*********************************/
.flexslider {
	background: #fff;
	position: relative;
	zoom: 1;
}
.flexslider .slides {zoom: 1;}
.flexslider .slides > li {position: relative;}

/* Suggested container for "Slide" animation setups. Can replace this with your own, if you wish */

.flex-container {zoom: 1; position: relative;}

/* Caption style */
/* IE rgba() hack */

.flex-caption {background:none; -ms-filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4C000000,endColorstr=#4C000000);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4C000000,endColorstr=#4C000000); zoom: 1;}
.flex-caption {width: 96%; padding: 2%; position: absolute; left: 0; bottom: 0; background: rgba(0,0,0,.3); color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,.3); font-size: 14px; line-height: 18px;}

p.flex-caption a {color: #fff;}
p.flex-caption a:hover {color: #fff, text-decoration: none;}

/* Direction Nav */
.flex-direction-nav li a {
	position: absolute;
	right: -2%; /* 14px / 700px */
	width: 41px; /* 29px / 700px */
	height: 41px; /* 29px / 248px */
	max-width: 29px;
	max-height: 29px;
	display: block;
	background-color: #3AC3E0;
	background-position: center center;
	background-repeat: no-repeat;
	cursor: pointer;
	-moz-border-radius: 5px;
	-webkit-border-radius: 5px;
	border-radius: 5px;
	z-index: 1000;
}

.flex-direction-nav li a:hover {background-color: #72D3E9;}

.flex-direction-nav li .next {
	background-image: url(img/global/button-arrow.png);
	background-position: 11px 7px;
	top: 38.73239436619718%; /* 110px / 284px */
}

.flex-direction-nav li .prev {
	background-image: url(img/global/button-back-arrow.png);
	top: 51.05633802816901%; /* 145px / 284px */
}

.flex-direction-nav li .disabled {
	opacity: .3;
	filter:alpha(opacity=30);
	cursor: default;
}

/* Control Nav */

.flex-control-nav {width: 100%; position: absolute; bottom: -35px; text-align: center;}
.flex-control-nav li {margin: 0 0 0 10px; display: inline-block; zoom: 1; *display: inline;}
.flex-control-nav li:first-child {margin: 0;}
.flex-control-nav li a {width: 10px; height: 10px; display: block; background: url(img/flexslider/pagination-dots.png) no-repeat 0 0; cursor: pointer; text-indent: -9999px;}
.flex-control-nav li a:hover {background-position: 0 -10px;}
.flex-control-nav li a.active {background-position: 0 -20px; cursor: default;}
 
Ultima modifica di un moderatore: