/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] Why when adding the jquery to my html it’s not working ?

In my html file inside the body tags i added the code:

[CODE]<div class=”vertical-slider-container”>
<img src=”https://cdn3.iconfinder.com/data/icons/faticons/32/arrow-up-01-128.png” id=”prev” class=”vertical-slider-nav vertical-slider-nav-up” />
<div class=”slideshow”
data-cycle-fx=”carousel”
data-cycle-timeout=”3000″
data-cycle-next=”#next”
data-cycle-prev=”#prev”
data-cycle-carousel-visible=”3″
data-cycle-carousel-vertical=”true”>

<img src=”http://malsup.github.io/images/beach1.jpg” />
<img src=”http://malsup.github.io/images/beach2.jpg” />
<img src=”http://malsup.github.io/images/beach3.jpg” />
<img src=”http://malsup.github.io/images/beach4.jpg” />
<img src=”http://malsup.github.io/images/beach5.jpg” />
<img src=”http://malsup.github.io/images/beach9.jpg” />
</div>
<img src=”https://cdn3.iconfinder.com/data/icons/faticons/32/arrow-down-01-128.png” id=”next” class=”vertical-slider-nav vertical-slider-nav-down” />
</div>
<script type=”text/javascript”>
$(‘.slideshow’).cycle();
</script>[/CODE]

Then in the top of the html after the head tag i added:

[CODE]<link rel=”stylesheet” type=”text/css” href=”Vertical_Slider.css”>[/CODE]

And i have a css file i created i called it Vertical_Slider.css
And there i added all the style code.

I did it just like the code in this JSFiddle:

[URL=”http://jsfiddle.net/uncb4bs9/3/”]http://jsfiddle.net/uncb4bs9/3/[/URL]

But what i get is the arrows are in the middle of the images on the slider and they are not working when clicking on them and the slider it self is not moving automatic like in the JSFiddle.

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@Clock_OutNov 25.2014 — jQuery has to be linked to your HTML document in the same way you link an external style sheet.

Download the jQuery library from the official site. Create a script tag at the head of the document and set its src attribute to path and file name of the library.

Some thing like:
[code=php]
<script src="jquery-2.1.1.min.js"></script>
[/code]


Then it'll work.
×

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.15,
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,
)...