jQuery Simple Slider
-
Hi, Im trainig to add jQuery Simple Slider http://loopj.com/jquery-simple-slider/
to my WP, but I have problem whit Javascript in page. Even when is included it dosnt workProblem CODE:
$(“[data-slider]”)
.each(function () {
var input = $(this);
$(“<span>”)
.addClass(“output”)
.insertAfter($(this));
})
.bind(“slider:ready slider:changed”, function (event, data) {
$(this)
.nextAll(“.output:first”)
.html(data.value.toFixed(3));
});Thanks for help.
-
Worth reviewing: http://codex.wordpress.org/Using_Javascript
So i put
CODE in to function coils
function number()
{
$(“[data-slider]”)
.each(function () {
var input = $(this);
$(“<span>”)
.addClass(“output”)
.insertAfter($(this));
})
.bind(“slider:ready slider:changed”, function (event, data) {
$(this)
.nextAll(“.output:first”)
.html(data.value.toFixed(3));
});
}call this number.js
and I added in to the page<script type=”text/javascript” src=”http://localhost/i-prosperity/wp-test/wp-ip/wp-content/themes/appdev/js/number.js”></script>
<script type=”text/javascript”>
<!–
number();
//–></script>and still nothing…. Im new in WP and JS to so meaby it something wrong between chair and the keybord 🙁
Any help?
The topic ‘jQuery Simple Slider’ is closed to new replies.