D
D
Danik Grachev2013-12-09 18:32:05
JavaScript
Danik Grachev, 2013-12-09 18:32:05

Why does the script not hook the ID element?

dftester.16mb.com - guinea pig

"script.js" - this crap should hook id="box", but it doesn't.

"http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"
"bouncebox_plugin/jquery.easing.1.3.js"
"bouncebox_plugin/jquery.bouncebox.1.0.js"


<script type="text/javascript" src="http://dftester.16mb.com/wp-content/themes/vulcano/js/script.js?ver=3.7.1"></script>


If he hit him, something like this would happen.
<div id="box" style="top: 0px; margin-left: -220.5px; position: fixed; left: 50%;">


I can't figure out what I'm doing wrong.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vit, 2013-12-09
@dfoster

Your script is included before jQuery. At the time of your script's execution, the $ function does not exist.
Put this line here:
before this one:
And in general, you have jquery connected several times on the page of different versions, somehow this is not good.

A
apecherin, 2013-12-09
@apecherin

"garbage", "trap", "thing" ..
could you express yourself in normal technical language?
when you read, you imagine a collective farmer who for some reason needed to hook a thing with garbage. thank.

M
Mikhail Shatilov, 2013-12-09
@iproger

1. There can be 2 elements with the same id.
2. Press F12-console, maybe there is an error.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question