If you include the metadata plugin ( http://plugins.jquery.com/project/metadata ), then you can specify initial values inside the HTML.
<div class="slider-class {slider: { value: 10 } }"></div> The options on init are determined in the following order (highest priority at top): options hash metadata plugin defaults On Jan 20, 7:59 am, "James Hughes" <j.hug...@kainos.com> wrote: > Hello, > > Can someone confirm if this is possible? I generate a page that has 10+ > sliders on it. Each has a different initial value when the page loads. Is > there a way to set the inital value as part of the <div> element? The reason > I ask is that I'd like to do a blanket $('slider-class').slider({...opts...}) > rather than having to do > $('slider-class').each(function(){$(this).slider({value:somevalue})}) . I > realise they are quite similar but it looks less neat when it's done. Surely > there must be way to specify say <div class="slider-class" initialValue=3/> > for example? > > James. > > -------------------------------------------------------------------- > This e-mail is intended solely for the addressee and is strictly > confidential; if you are not the addressee please destroy the message and all > copies. Any opinion or information contained in this email or its attachments > that does not relate to the business of Kainos > is personal to the sender and is not given by or endorsed by Kainos. Kainos > is the trading name of Kainos Software Limited, registered in Northern > Ireland under company number: NI19370, having its registered offices at: > Kainos House, 4-6 Upper Crescent, Belfast, BT7 1NT, > Northern Ireland. Registered in the UK for VAT under number: 454598802 and > registered in Ireland for VAT under number: 9950340E. This email has been > scanned for all known viruses by MessageLabs but is not guaranteed to be > virus free; further terms and conditions may be > found on our website -www.kainos.com