Closed RhapsodySolutions closed 12 years ago
How to add links for image. I have tried to use the following in the source-- it removes the links.
Because of bad and rigid assumption, it is not possible at the moment (make IMGs clicable). I'm going to improve rcarousel in a couple of weeks.
I consider your idea of enclosing IMG elements with A to make them clicable very interesting and I want to add this feature.
I wish you finding best option that will fit your needs.
Best regards.
Thanks for your response. I will look forward to the updated version of rcarousel.
This is a great product-- Thank you for sharing your work.
Hello, Yes this a great product!!! Do you have an idea when it will be ready? I am a bit annoyed because I need to enlarge the catousel (zoom) picture and I really which to use rcarousel. Cheers
Hello.
I don’t have much time now. I’m looking for a job (no money, no fun) and besides I’m focused on rlightbox. When will it be ready, I don’t know.
Hey. I started to improve rcarousel. Today’s commit allows you to use links and hopefully any element inside root element. But it is too early to use it in production now. Stay tuned for more! It will be much better!
cheers!
Appreciated if there's any update for adding link for images. Nice day!
rcarousel is in good shape now. What's left is testing across browsers. You can give it a try fetching testing repo. Please note that only few examples reflects new changes in code - they have not been changed yet. Stay tuned!
ryrych,
I tried the latest by fetching the testing repo, and updating all my files to match.
seems as though there is an error on line 279 of jquery.ui.jcarousel.js
Error: data.lastPage[i] is undefined
any idea on what I can do to fix this? The original rcarousel was great, but the addition of images and perhaps wrapping the links in facebox jquery classes will allow me to turn your carousel into a sort of image gallery.
On Tuesday 06 of December 2011 15:02:43 you wrote:
I tried the latest by fetching the testing repo, and updating all my files to match.
seems as though there is an error on line 279
Error: data.lastPage[i] is undefined
any idea on what I can do to fix this? The original rcarousel was great, but the addition of images and perhaps wrapping the links in facebox jquery classes will allow me to turn your carousel into a sort of image gallery.
I’ve got everything OK. Did you open an example or create your own? If the latter, show me the snippet. Ah, an what browser did you test in?
I created my own using an example.
I can retry before posting a snippet.
Latest firefox: 8.0.1 and chrome, but firefox has the error console which spit out the error.
I'll retry and get back :-)
Ok, Couple of comments/discoveries.
your example files are linking to jquery-1.4.4.min.js, and not the jquery-1.7.js that's in your widgets folder. your example files are also linking to a folder called "../../rcarousel", but you've moved the library files to "../../widget" lastly, i tried wrapping an image or a list item in a link anchor, and I can't click on the links. They are not functioning.
i am downloading the files from the "testing" branch, updated 2 days ago.
Yeah, the changes to examples weren’t pushed at the time. I’ve just pushed them. As for links, take a look at example_links.html example.
Please note that this is still testing branch and many things might not work.
Thanks so much for pushing the updates.
I realize that not everything may work but as long as the links work and it has the same functionality as the regular carousel- I'm sure I can use CSS to do the rest of the magic.
I'll let ya know how it turns out :-)
Glad to hear it! I’m going to add some web statistics to the documentation page to know if people are interested in rcarousel at all. Unfortunatelly current number of watchers (3) don’t reflect this (I am more lucky with rlightbox). But from time to time I get an e-mail from people outside github about my widget. Good.
Yeah, with CSS and some pure jQuery magic I created a nice example of html content – check out example_html.html file. It is going to be on the main page.
And let me know how it goes.
cheers!
here ya go!
Hi!
Thanks for rcarousel, jcarousel & lite was not working for me, i'm now using your code. Preverving links is insufficient. I need to preserve also the onclick events.
Here is your _addElement, modified:
_addElement: function( jQueryElement, direction ) {
var $root = $( this.element ),
$content = $root.find( "div.wrapper" ),
options = this.options;
jQueryElement
.width( options.width )
.height( options.height );
if ( options.orientation === "horizontal" ) {
$( jQueryElement ).css( "marginRight", options.margin );
} else {
$( jQueryElement ).css({
marginBottom: options.margin,
"float": "none"
});
}
if ( direction === "prev" ) {
var x = jQueryElement.clone()[0];
var a1 = nodeSearch(function(a) {return a.tagName == "A";}, x);
var a2 = nodeSearch(function(a) {return a.tagName == "A";}, jQueryElement[0]);
mapcar2(function(a,b) { a.onclick = b.onclick; }, a1, a2);
$content.prepend( x );
} else {
var x = jQueryElement.clone()[0];
var a1 = nodeSearch(function(a) {return a.tagName == "A";}, x);
var a2 = nodeSearch(function(a) {return a.tagName == "A";}, jQueryElement[0]);
mapcar2(function(a,b) { a.onclick = b.onclick; }, a1, a2);
$content.append(x);
}
},
nodeSearch searches domTree bfs or dfs, mapcar2 is map with two lists. you can refer to sources at www.coretal.net/library.core
evrim.
Hello,
I think the same is possible with passing a boolean of true to clone: http://api.jquery.com/clone/ Could you show me please, an example of what you are going to achieve?
Thank you very much for your interest!
right, domNode.clone(true); would solve the problem. nice day.
OK, figured it out. I will publish it tomorrow. Now it’s time for bed!
As of version 1.1.1 carousel respects event handlers and data on elements.
How to add links for image. I have tried to use the following in the source-- it removes the links. <ul>
<li>
<a href="http://www.yourtowntv.com/video/330/c/1/lakewood-october-news" >
<img src="http://img.youtube.com/vi/q1cug-02I64/2.jpg" />
</a>
</li>
</ul>
It does not work. Within the page, the link is gone.
Thanks.