[jQuery] Multiple elements slider
Hi, I have one slider that have to resize font-size on 4 different elements. At this time it works on all 4 of them (span) but I would like to make it work for any individual element that is selected. If I select one element the slider should resize only that one. My slider code is: // Font Size Slider $().ready(function() { document.onselectstart = new Function('return false'); /* simple slider[default skin] */ var maxFont = 60; var mf = $('span).css('font-size', 20); // var mf = $('span').attr('title'); $.fn.jSlider({ renderTo: '#slidercontainer1', size: { barWidth: 400, sliderWidth: 5 }, onChanging: function(percentage, e) { mf.css('font-size', maxFont * percentage); window.console console.log('percentage: %s', percentage); } }); }); Thank you for your help!
Re: [jQuery] Multiple elements slider
On Tue, Jan 19, 2010 at 1:39 PM, Mircea i...@amsterdamsat.com wrote: I have one slider that have to resize font-size on 4 different elements. At this time it works on all 4 of them (span) but I would like to make it work for any individual element that is selected. Have your selector add/remove a class, say, resizeable, then modify the slider to only manipulate elements with that class, a la: onChanging: function(percentage, e) { $(.resizeable).css('font-size', maxFont * percentage); Nathan