I need help figuring out how to run a dynamic jCarousel. I realize their is documentation, but the documentation doesn't fit my purposes and I'm not versed enough in javascript to figure it out. I've been trying for a couple hours now.
Basically I have elements that I want to add to my carousel on my page. If I click a link I want to add it to the carousel. After clicking an element I run an ajax request and append the return data to a "reel group", which is my jCarousel instance.
The problem I have is figuring out how to tell jCarousel about it. After I append the list item it doesn't show up properly.
Here's my ajax success function that retrieves the data:
success: function(data){
$("#reel_list").append(data);
var liCount = $('#reel_list').find('.videoEmbed').length;
So I'm relatively new at coding jQuery, and although I can use most methods fluently, I still consider myself a beginner.
The problem I have is that the jQuery UI Dialog only opens once after clicking it and not subsequent times. I know that there are blog posts describing how to get around the issue, such as this one:
However, after trying to make this fit my code, I still cannot get it to work.
Basically, I would like to use the jQuery Dialog instead of a third party lightbox solution. I have a bunch of loaded video thumbnails, and on click I want the associated video to open in a dialog. Each video will have a different video associated with it, which is found in a div with a class of 'video'. All the code I created doesn't work properly, and end up just showing a blank page or no functionality.
Any thoughts would be greatly appreciated.
I understand I need to somehow instantiate the dialog first with autoOpen: false.
.directors-videos is the class of the list item I will be clicking, containing the thumb .video is the div in that list item containing the video embed code.
var $dialog = $('.video') .dialog({ autoOpen: false, show: 'fade' });
$('.directors-videos').click(function() { $dialog.dialog('open'); // prevent the default action, e.g., following a link return false; });
I am having issues implementing a plugin by Ariel Flesler. If anyone could take 5-10min out of their busy day to help me, it would be greatly appreciated. I have done the steps below, but it still does not work.
I attached:
jquery
scrollTo
localScroll
Set links like so: <a href="#section1b">Section 1-b</a>
Set #ids on the divs to be scrolled to: <li class="sub" id="section1">
Called javascript:
jQuery(function( $ ){
$.localScroll({
target: '#container', queue:true, duration:1000, hash:true, onBefore:function( e, anchor, $target ){ // The 'this' is the settings object, can be modified }, onAfter:function( anchor, settings ){ // The 'this' contains the scrolled element (#content) }
});
});
I also want to stop the animation, so would I add stop: true, as a parameter?