Reputation: 11
Hello I am using the soliloquy slider plug in for wordpress, I am trying to get it to animate some text on each slide. Here is the little jquery function I wrote that seems like it should work.
jQuery(document).ready(function($){
// var $ulist = document.getElementById("soliloquy-325")
var $allElements = $("#soliloquy-325").find("li");
if($allElements.hasClass("soliloquy-active-slide")){
$this.find("soliloquy-caption").html("<div class='caption'><p>hello</p> </div>").fadeIn("slow");
}
});
But it doesn't seem to do anything and I'm not getting any errors when I check my console. Any Help would be greatly appreciated.`
Upvotes: 1
Views: 194
Reputation: 1287
I put something in jsfiddle - http://jsfiddle.net/donlaur/SA3La/ It does a little animation, not much. You can change effects or even use .animate if you wanted to do something different.
jQuery(document).ready(function ($) {
// var ulist = document.getElementById("soliloquy-325")
var allElements = $("#soliloquy-325").find("li");
if (allElements.hasClass("soliloquy-active-slide")) {
$(".soliloquy-caption").html("<div class='caption'><p>hello</p></div>");
// You set the new hello to a class of caption now
$(".caption").fadeOut("1000").fadeIn("1500");
}
});
Upvotes: 2