/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] Why when trying to run this jquery code it’s not working on netbeans ?

I have netbeans 8.0.1 and i’m using it with xampp 3.2.1 the xampp is running i clicked on the start button of apache.
I used it before with other codes and projects and it was working fine as local server but now i want to use jquery.

The jquery code i’m trying to use is this : [URL=”http://coolcarousels.frebsite.nl/c/28/”]http://coolcarousels.frebsite.nl/c/28/[/URL]

I created in netbeans new project html5 project and for now i have just for the testing one file index.html
In the index file i added this code:

[CODE]<!DOCTYPE html>
<!–
–>
<html>
<head>
<script src=”http://code.jquery.com/jquery-1.8.2.min.js” type=”text/javascript”></script>
<script src=”jquery.carouFredSel-6.0.4-packed.js” type=”text/javascript”></script>
<script type=”text/javascript”>
$(function() {

$(‘#carousel span’).append(‘<img src=”img/gui/carousel_glare.png” class=”glare” />’);
$(‘#thumbs a’).append(‘<img src=”img/gui/carousel_glare_small.png” class=”glare” />’);

$(‘#carousel’).carouFredSel({
responsive: true,
circular: false,
auto: false,
items: {
visible: 1,
width: 200,
height: ‘56%’
},
scroll: {
fx: ‘directscroll’
}
});

$(‘#thumbs’).carouFredSel({
responsive: true,
circular: false,
infinite: false,
auto: false,
prev: ‘#prev’,
next: ‘#next’,
items: {
visible: {
min: 2,
max: 6
},
width: 150,
height: ‘66%’
}
});

$(‘#thumbs a’).click(function() {
$(‘#carousel’).trigger(‘slideTo’, ‘#’ + this.href.split(‘#’).pop() );
$(‘#thumbs a’).removeClass(‘selected’);
$(this).addClass(‘selected’);
return false;
});

});
</script>
<style>html, body {
height: 100%;
padding: 0;
margin: 0;
}
body {
background: url(img/gui/bg_glare.png) top center no-repeat #bcc;
}
html > body {
min-height: 600px;
}
body * {
font-family: Arial, Geneva, SunSans-Regular, sans-serif;
font-size: 14px;
color: #333;
line-height: 22px;
}

#wrapper {
position: absolute;
width: 50%;
left: 25%;
top: 50px;
}
#carousel-wrapper {
padding-bottom: 10px;
position: relative;
}
#carousel, #thumbs {
overflow: hidden;
}
#carousel-wrapper .caroufredsel_wrapper {
border-radius: 10px;
box-shadow: 0 0 5px #899;
}

#carousel span, #carousel img,
#thumbs a, #thumbs img {
display: block;
float: left;
}
#carousel span, #carousel a,
#thumbs span, #thumbs a {
position: relative;
}
#carousel img,
#thumbs img {
border: none;
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}
#carousel img.glare,
#thumbs img.glare {
width: 102%;
height: auto;
}

#carousel span {
width: 554px;
height: 313px;
}

#thumbs-wrapper {
padding: 20px 40px;
position: relative;
}
#thumbs a {
border: 2px solid #899;
width: 150px;
height: 100px;
margin: 0 10px;
overflow: hidden;
border-radius: 10px;

-webkit-transition: border-color .5s;
-moz-transition: border-color .5s;
-ms-transition: border-color .5s;
transition: border-color .5s;
}
#thumbs a:hover, #thumbs a.selected {
border-color: #566;
}

#wrapper img#shadow {
width: 100%;
position: absolute;
bottom: 0;
}

#prev, #next {
background: transparent url(‘img/gui/carousel_nav.png’) no-repeat 0 0;
display: block;
width: 19px;
height: 20px;
margin-top: -10px;
position: absolute;
top: 50%;
}
#prev {
background-position: 0 0;
left: 10px;
}
#next {
background-position: -19px 0;
right: 10px;
}
#prev:hover {
background-position: 0 -20px;
}
#next:hover {
background-position: -19px -20px;
}
#prev.disabled, #next.disabled {
display: none !important;
}</style>
<title>TODO supply a title</title>
<meta charset=”UTF-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
</head>
<body>
<div>TODO write content</div>

<div id=”wrapper”>
<div id=”carousel-wrapper”>
<img id=”shadow” src=”img/gui/carousel_shadow.png” />
<div id=”carousel”>
<span id=”pixar”><img src=”img/large/pixar.jpg” /></span>
<span id=”bugs”><img src=”img/large/bugs.jpg” /></span>
<span id=”cars”><img src=”img/large/cars.jpg” /></span>
<span id=”incred”><img src=”img/large/incred.jpg” /></span>
<span id=”monsters”><img src=”img/large/monsters.jpg” /></span>
<span id=”nemo”><img src=”img/large/nemo.jpg” /></span>
<span id=”rat”><img src=”img/large/rat.jpg” /></span>
<span id=”toystory”><img src=”img/large/toystory.jpg” /></span>
<span id=”up”><img src=”img/large/up.jpg” /></span>
<span id=”walle”><img src=”img/large/walle.jpg” /></span>
</div>
</div>
<div id=”thumbs-wrapper”>
<div id=”thumbs”>
<a href=”#pixar” class=”selected”><img src=”img/small/pixar.jpg” /></a>
<a href=”#bugs”><img src=”img/small/bugs.jpg” /></a>
<a href=”#cars”><img src=”img/small/cars.jpg” /></a>
<a href=”#incred”><img src=”img/small/incred.jpg” /></a>
<a href=”#monsters”><img src=”img/small/monsters.jpg” /></a>
<a href=”#nemo”><img src=”img/small/nemo.jpg” /></a>
<a href=”#rat”><img src=”img/small/rat.jpg” /></a>
<a href=”#toystory”><img src=”img/small/toystory.jpg” /></a>
<a href=”#up”><img src=”img/small/up.jpg” /></a>
<a href=”#walle”><img src=”img/small/walle.jpg” /></a>
</div>
<a id=”prev” href=”#”></a>
<a id=”next” href=”#”></a>
</div>
</div>

</body>
</html>[/CODE]

In the netebas project directory on hard disk in my case it’s in: C:Usersbout0_000DocumentsNetBeansProjectsSlideShowWithPreview
I copied there the jquery.carouFredSel-6.0.4-packed.js file and also created a directory called img inside created gui,large,small directories copied thei mages to there.

When i’m running the project from netbeans i see the text the code as text. The code is not working i don’t see it as it is in the site demo.

Tried to make inspect element but i didn’t see any erorrs.

How can i run the jquery with netbeans on local server ? ( or maybe i need to use external server ?)

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@ChocoladeauthorNov 23.2014 — Solved: For some reason when creating html5 project on netbeans it dosent use xampp only php projects. I wonder why. I created now php project and the code is working. Is that suppose to be this way with netbeans and xampp ? Is there also a way to create html5 project that use xampp ?
×

Success!

Help @Chocolade spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...