Articles tagged 'rambling-slider'
-
The jQuery 1.7 .animate() method and percentages
November 13, 2011
This post was originally published in the Rambling Labs Blog on November 13, 2011.
As you may know, the jQuery Rambling Slider contains several animations. Some of them depend on changing the height of a div using percentages. Like this one:
slice.animate { height: '100%', opacity: '1.0' }, settings.speed
The problem with this is that with jQuery 1.7, the ‘100%’ was getting parsed to just ‘100’, so the height ended up being ‘100px’.
Thankfully, there’s an easy workaround:
slice.animate { height: "#{slider.height()}px", opacity: '1.0' }, settings.speed
In this case, the slider is the container for the slice. So I just made the slice’s height to be animated to the slider’s total height instead of using percentages.
I submitted a bug
-
Adding custom method calls to the jQuery Rambling Slider
November 12, 2011
This post was originally published in the Rambling Labs Blog on November 12, 2011.
The jQuery Rambling Slider v0.1.2 was released a couple of days ago. One of the features added was the ability to start and stop the slider like this:
$('#slider').ramblingSlider('stop'); $('#slider').ramblingSlider('start');
Every serious jQuery plugin has some way to change it’s behaviour or query some data after initialized and the general approach for this is calling the custom methods as showed above.
It is well known that in order to do this, you have to perform some dynamic method calling magic. This is what you find in the jQuery documentation:
(function($){ var methods = { init : function(options) { /*...*/ }, show : function() { /*…
-
jQuery Rambling Slider v0.1.2 is out!
November 11, 2011
This post was originally published in the Rambling Labs Blog on November 11, 2011.
I am proud to announce that version 0.1.2 of the jQuery Rambling Slider has been released!
It really has been out for a couple of days now, but I’ve had a couple of busy weeks. Nevertheless, I managed to do the major refactoring that I mentioned when version 0.1.1 was released. So, what have I added to this new release? Here’s the list:
- Added the ability to call the
stop
andstart
methods from$('#slider').ramblingSlider('stop')
. - Added the
foldLeft
animation. - Refactored the build process, as the commands remain the same (
cake build
andcake minify
) - Added the missing yuicompressor (oops…)
- Reformatted the for loops to be more CoffeeScript-ish.
- Added the…
- Added the ability to call the
-
Unit testing the jQuery Rambling Slider - Part 2 - The DOM, jQuery and node.js
November 9, 2011
This post was originally published in the Rambling Labs Blog on November 9, 2011.
In order to continue to add tests to the jQuery Rambling Slider, I needed to test something against the DOM. Problem is, you don’t count with the DOM when you’re running the Jasmine tests from console. So what should I do?
As expected, I found that there is a DOM emulator in node.js :D. Also, to test using jQuery I needed to download the corresponding node package. So I didn’t waste any time and went ahead to install them:
npm install -g jsdom npm install -g jquery
So now, I can write something like this in my
src/jquery.plugins.coffee
:(($) -> $.fn.reverse = [].reverse )(jQuery)
And test it on my
spec/jquery.plugins.spec.coffee
with something like this… -
Unit testing the jQuery Rambling Slider - CoffeeScript, Jasmine and node.js
November 9, 2011
This post was originally published in the Rambling Labs Blog on November 9, 2011.
As you may know, I have been working lately on the jQuery Rambling Slider. One of my personal milestones with this project is to write as many unit tests as possible, so I began my research.
Honestly, I didn’t know where to begin. I remember to have read once on twitter that someone was writing their tests with Jasmine and CoffeeScript, so that could be a good starting point (and it sounds really fun too!). I have worked with Jasmine before and it sure was a great experience. It’s yet another productivity tool made by the great Pivotal Labs guys.
After googling for a while, I stumbled into a post from someone that was writing tests in Jasmine and node.js
-
jQuery Rambling Slider v0.1.1 is out!
October 23, 2011
This post was originally published in the Rambling Labs Blog on October 23, 2011.
Yesterday, I released v0.1.0 of the jQuery Rambling Slider and, as it happens with with all software development, some bugs were found. But hey, I took the time to fix them and now the v0.1.1 is out!
Among the fixed issues:
- Some effects not working with the default settings.
- Flaky ‘boxRandom’ effect (some boxes not showing).
- Control Navigation not showing when styled to be outside of slider (negative margin and hidden overflow).
Let me know if you find any other issues. Major refactoring is up for next release.
UPDATE Version 0.1.2 was released.
:D
-
jQuery Rambling Slider has been released!
October 22, 2011
This post was originally published in the Rambling Labs Blog on October 22, 2011.
A while ago I was looking for a good image slider jQuery plugin to use on a project, and Nivo Slider turned out to be the best candidate. I made some modifications for my needs at the moment and issued a pull request, but had no luck. I also said that if my pull request didn’t get accepted or took too long to be accepted, I would release it myself.
Guess what? I got tired of waiting, so here it is! I just uploaded my first stable release of the now called jQuery Rambling Slider. :)
It’s still basically the same Nivo Slider with the tweaks I made in my fork. It’s now written in CoffeeScript, which I’m having a lot of fun with, while the compiled JavaScript…