Search Results

Search found 691 results on 28 pages for 'slider'.

Page 5/28 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Javascript slider Image and text from php, scrollable in groups by indexes

    - by Roberto de Nobrega
    I am looking for a javascript solution that slides images with text, pulled from php. This slider will slide in groups by indexes in points. I was googling, but nothing as I need. I am going to make an example. Imagine 10 products. I need to show the principal picture, and a text below the image. It is going to show 6 products, and with points (indexes), I click and the group slides to the next group. Do you know some script.?? I know the php code, but I am a newbie with javascript.! Thanks.!! PD. I am lost of where i have to put this question. So, If this was a wrong place, let me know, and accept my apologises.! ;)

    Read the article

  • How do I control the direction of the scroll on my coda slider?

    - by lightingwrist
    Hello, I have a coda slider and am unable to determine the direction of the scroll. I have 3 panels that I want to scroll left to right. Sometimes it scrolls left to right, sometimes up and down, and sometimes horizontally. How do I lock it down to go the direction I want? Here is the HTML: <body> <div id="slider_home" class="round_10px"> <ul class="navigation_home"> <li><a href="#scroll_Parents" class="round_10px">Information For Parents</a></li> <li><a href="#scroll_Materials" class="round_10px">Print Materials</a></li> <li><a href="#scroll_Resources" class="round_10px">Online Resources</a></li> </ul> <div id="scroll_bg_home"> <div class="scroll_home"> <div class="scrollContainer_home"> <div class="panel_home" id="scroll_Parents"> content </div> <div class="panel_home" id="scroll_Materials"> content </div> <div class="panel_home" id="scroll_Resources"> content </div> </div> </div> </div> </div> </body> Here is the CSS: #wrapper {width:550px;margin:0px auto;} #intro {padding-bottom:10px;} h2 {margin:0;margin-bottom:14px;padding:0;} #slider {width:631px;margin:10px auto 0px auto;position:relative;} #scroll_bg{height:360px;width:590px;overflow:hidden;position:relative;clear:left;background:#FFFFFF url(images/) no-repeat; margin:0px auto 0px auto} .scroll{ background:transparent; width:550px; height:370px; padding:0px; margin:0px auto; overflow:hidden; } .scrollContainer div.panel {padding:20px 0px;height:330px; width:550px;margin:0px;float:left;} #shade {background:#EDEDEC url(images/shade.jpg) no-repeat 0 0;height:50px;} ul.navigation {list-style:none;margin:0px 0px 0px 23px;padding:0px;padding-bottom:0px;} ul.navigation li {display:inline; margin-right:5px;} ul.navigation li a { background:#FFFFFF;font-family:Arial, Helvetica, sans-serif; font-size:16px; font-weight:bold; color:#CCCCCC;padding:5px 5px 5px 5px;border:1px #F4F4F4 solid;text-decoration: none;} ul.navigation a:hover { color:#EDEDEC;border:1px #E6E6E6 solid;} ul.navigation a.selected {color:#333333;} ul.navigation a:focus {outline:none;} .scrollButtons {position:absolute;top:150px;cursor:pointer;} .scrollButtons.left {left:-37px;top:20px} .scrollButtons.right {right:-32px;top:20px;} .hide {display:none;} And here is the Jquery includes file: // when the DOM is ready... $(document).ready(function () { var $panels = $('#slider_home .scrollContainer_home > div.panel_home'); var $container = $('#slider_home .scrollContainer_home'); // if true, we'll float all the panels left and fix the width // of the container var horizontal = true; // float the panels left if we're going horizontal if (horizontal) { $panels.css({ 'float' : 'left', 'position' : 'relative' // IE fix to ensure overflow is hidden }); // calculate a new width for the container (so it holds all panels) $container.css('width', $panels[0].offsetWidth * $panels.length); } // collect the scroll object, at the same time apply the hidden overflow // to remove the default scrollbars that will appear var $scroll_bg = $('#scroll_bg_home'); var $scroll = $('#slider_home .scroll_home').css('overflow', 'hidden'); // apply our left + right buttons $scroll_bg .before('<img class="scrollButtons_home left" src="styles/images/BackFlip.jpg" />') .after('<img class="scrollButtons_home right" src="styles/images/flipForward.jpg" />'); // handle nav selection function selectNav() { $(this) .parents('ul:first') .find('a') .removeClass('selected') .end() .end() .addClass('selected'); } $('.navigation_home').find('a').click(selectNav); // go find the navigation link that has this target and select the nav function trigger(data) { var el = $('.navigation_home').find('a[href$="' + data.id + '"]').get(0); selectNav.call(el); } if (window.location.hash) { trigger({ id : window.location.hash.substr(1) }); } else { $('.navigation_home a:first').click(); } // offset is used to move to *exactly* the right place, since I'm using // padding on my example, I need to subtract the amount of padding to // the offset. Try removing this to get a good idea of the effect var offset = parseInt((horizontal ? $container.css('paddingTop') : $container.css('paddingLeft')) || 0) * -1; var scrollOptions = { target: $scroll, // the element that has the overflow // can be a selector which will be relative to the target items: $panels, navigation: '.navigation_home a', // selectors are NOT relative to document, i.e. make sure they're unique prev: 'img.left', next: 'img.right', // allow the scroll effect to run both directions axis: 'xy', onAfter: trigger, // our final callback offset: offset, // duration of the sliding effect duration: 500, // easing - can be used with the easing plugin: // http://gsgd.co.uk/sandbox/jquery/easing/ easing: 'swing' }; // apply serialScroll to the slider - we chose this plugin because it // supports// the indexed next and previous scroll along with hooking // in to our navigation. $('#slider_home').serialScroll(scrollOptions); // now apply localScroll to hook any other arbitrary links to trigger // the effect $.localScroll(scrollOptions); // finally, if the URL has a hash, move the slider in to position, // setting the duration to 1 because I don't want it to scroll in the // very first page load. We don't always need this, but it ensures // the positioning is absolutely spot on when the pages loads. scrollOptions.duration = 1; $.localScroll.hash(scrollOptions); });

    Read the article

  • Parametrizing max value of a jQuery ui slider

    - by Gandalf StormCrow
    I'm trying to create this slider http://jqueryui.com/demos/slider/#rangemax Is it possible to parametrize the max value? For ex: $("#slider-range-max").slider({ range: "max", min: 1, max: maxValue, value: 2, slide: function(event, ui) { $("#amount").val(ui.value); } }); Is it possible to pass maxValue value, when I click on something? After its been initialized? Not on document ready function, but even after that?

    Read the article

  • Parameterizing max value of a jQuery ui slider

    - by Gandalf StormCrow
    I'm trying to create this slider http://jqueryui.com/demos/slider/#rangemax Is it possible to parametrize the max value? For ex: $("#slider-range-max").slider({ range: "max", min: 1, max: maxValue, value: 2, slide: function(event, ui) { $("#amount").val(ui.value); } }); Is it possible to pass maxValue value, when I click on something? After its been initialized? Not on document ready function, but even after that?

    Read the article

  • Need help with jquery ui slider

    - by Gandalf StormCrow
    I'm trying to create this slider http://jqueryui.com/demos/slider/#rangemax Is it possible to parametrize the max value? For ex: $("#slider-range-max").slider({ range: "max", min: 1, max: maxValue, value: 2, slide: function(event, ui) { $("#amount").val(ui.value); } }); Is it possible to pass maxValue value, when I click on something ?After its been initialized? not on document ready function, after that?

    Read the article

  • Change background color of JQuery slider

    - by DotnetDude
    I understand I can set the background color of the value from min to the current slider selection by doing a: #slider .ui-slider-range { background: #88ac0b; } How do I set the background color for the entire slider (not just from the min or max to the selected value)

    Read the article

  • Disabling click or mousedown event on jQuery UI Slider

    - by Sparda
    I am trying to disable the click or mousedown event on the Slider tract. I want the slider to only move by dragging the handle. I tried adding preventDefault() and return false to the slider but no use. Its still triggering the jump. Example: http://jsbin.com/iguruh/1/edit I know this is similar to this jQuery UI Slider - Disable click on slider track but the solutions provided there are not working because i have the range option set to false. Appreciate any help.

    Read the article

  • Where can I find a jQuery article rotator / carousel / slider?

    - by Steven
    I want to make an article rotator similar to http://www.vmagazine.com/ And I want to use jQuery. I know there are carousels like jCarousel and jQuery Carousel. There is also the Coda-Slider, but I don't fint it very elegant. Can anyone suggest a good jQuery method / script for having an article carousel? I don't want to use MooTools, Prototype etc. since I'm already using jQuery. Any suggestions anyone?

    Read the article

  • What are the keyboard shortcuts to operate a Mac slider control

    - by doekman
    In the Safari RSS screen, there is a slider (or range) control to change an article's summary length. By pressing TAB a couple of times, it is possible to navigate to this control, without using the mouse. Is it also possible, to slide the slider with the keyboard? Thus sliding the knob to the right and left? The volume slider in iTunes can be operated by the arrow-keys, but in Safari's RSS window, these are used to scroll the text if there are any scrollbars... Note: in System Preferences, Keyboard (OS X 10.6), Keyboard Shortcuts, I have set Full Keyboard Access to All controls. Otherwise, the TAB key only navigates between text boxes and lists.

    Read the article

  • How can I add a previous button to this Jquery Content Slider?

    - by user1269988
    I did this nice tutorial for a Jquery Content Slider: http://brenelz.com/blog/build-a-content-slider-with-jquery/ Here is my test page: http://www.gregquinn.com/oneworld/brenez_slider_test.html But the Left button is hidden on the first slide and I do not want it to be. I don't know much about jquery but I tried to set the left button from opacity o to 100 or 1 and it didn't work the button showed up once but did not work. Does anyone know how to do this? Here is the code: (function($) { $.fn.ContentSlider = function(options) { var defaults = { leftBtn : 'images/panel_previous_btn.gif', rightBtn : 'images/panel_next_btn.gif', width : '900px', height : '400px', speed : 400, easing : 'easeOutQuad', textResize : false, IE_h2 : '26px', IE_p : '11px' } var defaultWidth = defaults.width; var o = $.extend(defaults, options); var w = parseInt(o.width); var n = this.children('.cs_wrapper').children('.cs_slider').children('.cs_article').length; var x = -1*w*n+w; // Minimum left value var p = parseInt(o.width)/parseInt(defaultWidth); var thisInstance = this.attr('id'); var inuse = false; // Prevents colliding animations function moveSlider(d, b) { var l = parseInt(b.siblings('.cs_wrapper').children('.cs_slider').css('left')); if(isNaN(l)) { var l = 0; } var m = (d=='left') ? l-w : l+w; if(m<=0&&m>=x) { b .siblings('.cs_wrapper') .children('.cs_slider') .animate({ 'left':m+'px' }, o.speed, o.easing, function() { inuse=false; }); if(b.attr('class')=='cs_leftBtn') { var thisBtn = $('#'+thisInstance+' .cs_leftBtn'); var otherBtn = $('#'+thisInstance+' .cs_rightBtn'); } else { var thisBtn = $('#'+thisInstance+' .cs_rightBtn'); var otherBtn = $('#'+thisInstance+' .cs_leftBtn'); } if(m==0||m==x) { thisBtn.animate({ 'opacity':'0' }, o.speed, o.easing, function() { thisBtn.hide(); }); } if(otherBtn.css('opacity')=='0') { otherBtn.show().animate({ 'opacity':'1' }, { duration:o.speed, easing:o.easing }); } } } function vCenterBtns(b) { // Safari and IE don't seem to like the CSS used to vertically center // the buttons, so we'll force it with this function var mid = parseInt(o.height)/2; b .find('.cs_leftBtn img').css({ 'top':mid+'px', 'padding':0 }).end() .find('.cs_rightBtn img').css({ 'top':mid+'px', 'padding':0 }); } return this.each(function() { $(this) // Set the width and height of the div to the defined size .css({ width:o.width, height:o.height }) // Add the buttons to move left and right .prepend('<a href="#" class="cs_leftBtn"><img src="'+o.leftBtn+'" /></a>') .append('<a href="#" class="cs_rightBtn"><img src="'+o.rightBtn+'" /></a>') // Dig down to the article div elements .find('.cs_article') // Set the width and height of the div to the defined size .css({ width:o.width, height:o.height }) .end() // Animate the entrance of the buttons .find('.cs_leftBtn') .css('opacity','0') .hide() .end() .find('.cs_rightBtn') .hide() .animate({ 'width':'show' }); // Resize the font to match the bounding box if(o.textResize===true) { var h2FontSize = $(this).find('h2').css('font-size'); var pFontSize = $(this).find('p').css('font-size'); $.each(jQuery.browser, function(i) { if($.browser.msie) { h2FontSize = o.IE_h2; pFontSize = o.IE_p; } }); $(this).find('h2').css({ 'font-size' : parseFloat(h2FontSize)*p+'px', 'margin-left' : '66%' }); $(this).find('p').css({ 'font-size' : parseFloat(pFontSize)*p+'px', 'margin-left' : '66%' }); $(this).find('.readmore').css({ 'font-size' : parseFloat(pFontSize)*p+'px', 'margin-left' : '66%' }); } // Store a copy of the button in a variable to pass to moveSlider() var leftBtn = $(this).children('.cs_leftBtn'); leftBtn.bind('click', function() { if(inuse===false) { inuse = true; moveSlider('right', leftBtn); } return false; // Keep the link from firing }); // Store a copy of the button in a variable to pass to moveSlider() var rightBtn = $(this).children('.cs_rightBtn'); rightBtn.bind('click', function() { if(inuse===false) { inuse=true; moveSlider('left', rightBtn); } return false; // Keep the link from firing }); }); } })(jQuery)

    Read the article

  • Coda slider from within Tabbed Ajax?

    - by voyageur
    Hi I am trying to use a simple Jquery Coda slider (that works fine alone) inside one of the tabs in the Jquery Tools Tabbed Ajax. When I click that tab, it is empty ! while it actually display the Coda slider. The tab page is exactly the same as the one on Jquery Tools site: Tabs demo 11 / 13 : Loading tab contents with AJAX The Coda slider is: <div class="coda-slider-wrapper"> <div class="coda-slider preload" id="coda-slider-1"> <div class="panel"> <div class="panel-wrapper"> <h2 class="title">Panel 1</h2> <p>This slider uses default settings.</p> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas metus nulla, commodo a sodales sed, dignissim pretium nunc. Nam et lacus neque. Sed volutpat ante id mauris laoreet vestibulum. Nam blandit felis non neque cursus aliquet. Morbi vel enim dignissim massa dignissim commodo vitae quis tellus. Nunc non mollis nulla. Sed consectetur elit id mi consectetur bibendum. Ut enim massa, sodales tempor convallis et, iaculis ac massa. Etiam suscipit nisl eget lorem pellentesque quis iaculis mi mattis. Aliquam sit amet purus lectus. Maecenas tempor ornare sollicitudin.</p> </div> </div> <div class="panel"> <div class="panel-wrapper"> <h2 class="title">Panel 2</h2> <p>Proin nec turpis eget dolor dictum lacinia. Nullam nunc magna, tincidunt eu porta in, faucibus sed magna. Suspendisse laoreet ornare ullamcorper. Nulla in tortor nibh. Pellentesque sed est vitae odio vestibulum aliquet in nec leo.</p> </div> </div> Help is very much appreciated, and thanx.

    Read the article

  • jQuery slider onChange auto submit form

    - by bikey77
    I'm using a jQuery slider as a price range selector in a form. I'd like to have the form submit automatically when one of the values has been changed. I used a couple of examples I found on SO but they didn't work with my code. <form action="itemlist.php" method="post" enctype="application/x-www-form-urlencoded" name="priceform" id="priceform" target="_self"> <div id="slider-holder"> Prices: From <span id="pricefromlabel">100 &#8364;</span> To <span id="pricetolabel">500 &#8364;</span> <input type="hidden" id="pricefrom" name="pricefrom" value="100" /> <input type="hidden" id="priceto" name="priceto" value="500" /> <div id="slider-range"></div> <input name="Search" type="submit" value="Search" /> </div> </form> This is the code that displays the values of the slider and updates 2 hidden form fields I use to store the prices in order to submit: <script> $(function() { $("#slider-range" ).slider({ range: true, min: 0, max: 1000, values: [ <?=$minprice?>, <?=$maxprice?> ], start: function (event, ui) { event.stopPropagation(); }, slide: function( event, ui ) { $( "#pricefrom" ).val(ui.values[0]); $( "#priceto" ).val(ui.values[1]); $( "#pricefromlabel" ).html(ui.values[0] + ' &euro;'); $( "#pricetolabel" ).html(ui.values[1] + ' &euro;'); } }); return false; }); </script> I've tried adding this code as well as an data-autosubmit="true" attribute to the div but no result. $(function() { $('[data-autosubmit="true"]').change(function() { parentForm = $(this).('#priceform'); clearTimeout(submitTimeout); submitTimeout = setTimeout(function() { parentForm.submit() }, 100); }); I've also tried adding a $.post() event to the slider but I'm not very good with jQuery so I'm probably doing it wrong. Any help will be appreciated.

    Read the article

  • JQuery SelectToUISlider Issues

    - by David Savage
    Hopefully this hasn't been asked before as just a slider question, but I couldn't find an answer when already browsing questions. So, here goes: I have a SelectToUISlider (http://www.filamentgroup.com/lab/update_jquery_ui_slider_from_a_select_element_now_with_aria_support/) which is basically a modified JQuery UI Slider, and I'm using a range value. So, I start with one handle at 60, and another at 100 (scale from 0 to 100). What I want to do is click a radio button so that the 100 changes to a 0, and be able to change back to 100. I have been unsuccessful at changing it via JQuery selectors/javascript. However, when changing the selects to move the handles, this works, but the range appears not to follow if the second handle (at 100) moves to 0 behind the first handle (at 60). I'm thinking I might have to destroy the slider and rebuild it with the second handle (that starts as 100) become the first handle at 0 in this scenario (although I've tried destroying it and it doesn't seem to respond to that either.) Here's what I've tried so far that doesn't work: <script type="text/javascript"> {literal} $(function(){ $('select').selectToUISlider({ labels: 10 }); }); function event_occurs(does) { if (does == 1) { $('.ui-slider').slider('option', 'values', [60,100]); } else { $('.ui-slider').slider('option', 'values', [0,60]); } } </script> <style type="text/css"> form {font-size: 62.5%; font-family:"Segoe UI","Helvetica Neue",Helvetica,Arial,sans-serif; } fieldset { border:0; margin: 1em; height: 12em;} label {font-weight: normal; float: left; margin-right: .5em; font-size: 1.1em;} select {margin-right: 1em; float: left;} .ui-slider {clear: both; top: 5em;} .ui-slider-tooltip {white-space: nowrap;} </style> {/literal} <form action="#"> <fieldset> <select name="valueA" id="my_estimate"> {section name="estimates" loop=101} <option value="{$smarty.section.estimates.index}"{if $smarty.section.estimates.index == 60} selected{/if}>{$smarty.section.estimates.index}</option> {/section} </select> <select name="valueB" id="payout"> {section name="estimates" loop=101} <option value="{$smarty.section.estimates.index}"{if $smarty.section.estimates.index == 100} selected{/if}>{$smarty.section.estimates.index}</option> {/section} </select> </fieldset> </form> <input type="radio" onclick="event_occurs(1)" name="Event" checked="checked"> Event Occurs<br /> <input type="radio" onclick="event_occurs(0)" name="Event"> Event Does Not Occur As it is now, nothing happens when clicking the radio buttons, but I'm also not getting any Javascript errors. After I get this working, I would also like to find some way to disable one of the handles through changing the slider property. Ie leave the handle where its at but not allow it to be dragged. Any help is greatly appreciated.

    Read the article

  • Slider with buttons. How to improve?

    - by Kalinin
    I need to make slider. I have content (which should shift horizontally) and two buttons - "right" and "left". If you press the button and hold it, the content starts to move (in the appropriate direction). If you not hold the button, then the movement stops. This behavior is copies the behavior of usual window scrollbar. I wrote code: var animateTime = 1, offsetStep = 5; //event handling for buttons "left", "right" $('.bttR, .bttL') .mousedown(function() { scrollContent.data('loop', true).loopingAnimation($(this)); }) .bind("mouseup mouseout", function(){ scrollContent.data('loop', false); }); $.fn.loopingAnimation = function(el){ if(this.data('loop') == true){ var leftOffsetStr; leftOffsetInt = parseInt(this.css('marginLeft').slice(0, -2)); if(el.attr('class') == 'bttR') leftOffsetStr = (leftOffsetInt - offsetStep).toString() + 'px'; else if(el.attr('class') == 'bttL') leftOffsetStr = (leftOffsetInt + offsetStep).toString() + 'px'; this.animate({marginLeft: leftOffsetStr}, animateTime, function(){ $(this).loopingAnimation(el); }) } return this; } But it does have a few things that I do not like: Always call the function animation (loopingAnimation) - I think that this is an extra load (not good). When moving content he "twitches and trembling" - (it's not pretty). How can I solve this problem more elegantly and without the drawbacks of my code?

    Read the article

  • WPF: adding Style to a slider

    - by user279244
    Hi I am using a Slider and putting a style element over it as follows... But however, I am not able to figure out why the style is not getting reflected. The RepeatButtons are not still visible. Thanks in advance <ResourceDictionary> <LinearGradientBrush x:Key="Stroke_Gradient" EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="#FF6E6E6E" Offset="0"/> <GradientStop Color="#FFFFFFFF" Offset="0.496"/> <GradientStop Color="#FF6E6E6E" Offset="1"/> </LinearGradientBrush> <Style x:Key="ScrollBar_RepeatButtonStyle1" d:IsControlPart="True" TargetType="{x:Type RepeatButton}"> <Setter Property="Background" Value="#FF6E6E6E"/> <Setter Property="BorderBrush" Value="#FFFFFFFF"/> <Setter Property="IsTabStop" Value="false"/> <Setter Property="Focusable" Value="false"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type RepeatButton}"> <Grid> <Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding BorderThickness}"/> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> <ImageBrush x:Key="zoomBkgrnd" TileMode="None" ImageSource="zoombg.png" Stretch="Uniform"/> <Style x:Key="{x:Type Slider}" TargetType="{x:Type Slider}"> <Setter Property="Background" Value="{StaticResource zoomBkgrnd}"/> <Setter Property="BorderBrush" Value="{StaticResource zoomBkgrnd}"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type Slider}"> <Grid x:Name="GridRoot"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <!-- TickBar shows the ticks for Slider --> <TickBar Visibility="Collapsed" x:Name="TopTick" Height="4" SnapsToDevicePixels="True" Placement="Top" Fill="{StaticResource zoomBkgrnd}"/> <Border Grid.Row="1" Margin="0" x:Name="Border" Height="4" Background="{StaticResource zoomBkgrnd}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2"/> <!-- The Track lays out the repeat buttons and thumb --> <Track Grid.Row="1" x:Name="PART_Track"> <Track.Thumb> <Thumb Width="10" Height="20" /> </Track.Thumb> <Track.IncreaseRepeatButton> <RepeatButton Style="{DynamicResource ScrollBar_RepeatButtonStyle1}" Command="Slider.IncreaseLarge"/> </Track.IncreaseRepeatButton> <Track.DecreaseRepeatButton> <RepeatButton Style="{DynamicResource ScrollBar_RepeatButtonStyle1}" Command="Slider.DecreaseLarge"/> </Track.DecreaseRepeatButton> </Track> <TickBar Visibility="Collapsed" Grid.Row="2" x:Name="BottomTick" Height="4" SnapsToDevicePixels="True" Placement="Bottom" Fill="{TemplateBinding Foreground}"/> </Grid> <ControlTemplate.Triggers> <Trigger Property="TickPlacement" Value="TopLeft"> <Setter Property="Visibility" Value="Visible" TargetName="TopTick"/> </Trigger> <Trigger Property="TickPlacement" Value="BottomRight"> <Setter Property="Visibility" Value="Visible" TargetName="BottomTick"/> </Trigger> <Trigger Property="TickPlacement" Value="Both"> <Setter Property="Visibility" Value="Visible" TargetName="TopTick"/> <Setter Property="Visibility" Value="Visible" TargetName="BottomTick"/> </Trigger> <Trigger Property="IsEnabled" Value="false"> <Setter Property="Background" Value="{StaticResource zoomBkgrnd}" TargetName="Border"/> <Setter Property="BorderBrush" Value="{StaticResource zoomBkgrnd}" TargetName="Border"/> </Trigger> <!-- Use a rotation to create a Vertical Slider form the default Horizontal --> <Trigger Property="Orientation" Value="Vertical"> <Setter Property="LayoutTransform" TargetName="GridRoot"> <Setter.Value> <RotateTransform Angle="-90"/> </Setter.Value> </Setter> <!-- Track rotates itself based on orientation so need to force it back --> <Setter TargetName="PART_Track" Property="Orientation" Value="Horizontal"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> </ResourceDictionary>

    Read the article

  • How to set parameters of CGContextAddArcToPoint method using a slider

    - by Manish Sahni
    am making an app in which i have to control a smile of a face like graphics. For example if i slide the slider down(to a value less than middle) it should give the arc a sad face(like :-( ) effect and if i slide the slider up the arc should give the effect of smile(like :-) ).initially lips are like :-| . I need to control the lips which is an arc using a slider? smileSliderViewController.h #import <UIKit/UIKit.h> @interface smileSliderViewController : UIViewController { IBOutlet UISlider *slider; } -(IBAction)valueChange:(id)sender; @end smileSliderViewController.m #import "smileSliderViewController.h" //#import "smile.h" @implementation smileSliderViewController -(IBAction)valueChange:(id)sender { int value = (int)(slider.value); if(value>0 && value<25) { //value--; CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetLineWidth(context, 2.0); CGColorSpaceRef colorspace = CGColorSpaceCreateDeviceRGB(); CGFloat components[] = {0.0,0.0,1.0,1.0}; CGColorRef color = CGColorCreate(colorspace, components); CGContextSetStrokeColorWithColor(context, color); CGContextMoveToPoint(context, 120,180); CGContextAddArcToPoint(context, 190 , 170, 270, 200, 0 ); CGContextStrokePath(context); } } smile.h #import <UIKit/UIKit.h> #import "smile.m" @interface smile : UIView { IBOutlet UISlider *slider; } @end smile.m #import "smile.h" #import "smileSliderViewController.h" @implementation smile - (id)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { // Initialization code } return self; } - (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetLineWidth(context, 2.0); //CGContextSetStrokeColor(context, [UIColor redColor].CGColor); CGColorSpaceRef colorspace = CGColorSpaceCreateDeviceRGB(); CGFloat components[] = {0.0,0.0,1.0,1.0}; CGColorRef color = CGColorCreate(colorspace, components); CGContextSetStrokeColorWithColor(context, color); CGRect rectangle = CGRectMake(60, 20, 200,200); CGContextAddEllipseInRect(context, rectangle); CGContextStrokePath(context); /*CGRect rectangle1 = CGRectMake(130,170,50,10); CGContextAddRect(context,rectangle1); CGContextStrokePath(context);*/ /*CGContextMoveToPoint(context,100,200); CGContextAddArcToPoint(context,120,150,400,150,70 ); CGContextStrokePath(context);*/ /*CGContextMoveToPoint(context, 100,100); CGContextAddArcToPoint(context, -100,200, -400,200, 80); CGContextStrokePath(context);*/ CGContextSetStrokeColorWithColor(context,color); CGRect rectangle2 = CGRectMake(80, 90, 50, 8); CGContextAddEllipseInRect(context, rectangle2); CGContextStrokePath(context); CGContextSetStrokeColorWithColor(context,color); CGRect rectangle3 = CGRectMake(180, 90, 50, 8); CGContextAddEllipseInRect(context, rectangle3); CGContextStrokePath(context); CGContextSetStrokeColorWithColor(context,color); CGContextMoveToPoint(context, 155,120); CGContextAddLineToPoint(context, 155,160); CGContextStrokePath(context); /*CGContextSetStrokeColorWithColor(context, color); CGRect rectangle4 = CGRectMake(130, 180, 50,8); CGContextAddEllipseInRect(context, rectangle4); CGContextStrokePath(context);*/ /*CGContextSetStrokeColorWithColor(context,color); CGContextMoveToPoint(context, 120,180); CGContextAddLineToPoint(context, 190,180); CGContextStrokePath(context);*/ int value = (int)(slider.value); if(value == 25) { CGContextMoveToPoint(context, 120,180); CGContextAddArcToPoint(context, 190 , 180, 250 , 180, 0 ); CGContextStrokePath(context); } }

    Read the article

  • jQuery UI slider coming out looking wierd

    - by jondavidjohn
    http://cl.ly/2W1V3s0G2G3y3D133I3U <--screenshot of rendered slider It acts normally by clicking the inner whitespace of the slider and dragging, values act accordingly, but the handles do not move and fill the area, and the line at the top grows/shrinks with the difference of the two values. Here is the code I am using to initiate the slider. $('.sliderific').each(function(){ alert($(this).attr('id')); $(this).slider({ range: true, min: 0, max: 500, values: [ 75, 300 ], slide: function( event, ui ) { $(this).nextAll('.left:first').text(ui.values[ 0 ]); $(this).nextAll('.right:first').text(ui.values[ 1 ]); } }); }); and here is the DOM it's being applied to... <div class="white notwide"> <div id="price-slider" class="sliderific"></div> <span class="em small gray left center">Min Price</span> <span class="em small gray right center">Max Price </span> </div> EDIT : Also, I have verified I am including the proper css and the jquery theme images are connecting and being loaded.

    Read the article

  • scala Slider throws casting exception

    - by coubeatczech
    hello, I create an Slider object: val slider = new Slider{ min = 0 max = 30 labels = Map(0 -> new Label("Nula"),15-> new Label("Pul"),30-> new Label("Max")) paintLabels = true } when I run this, an exception is thrown: scala.swing.Label cannot be cast to java.awt.Component but why? When i browse the docs, the excpected type for labels is a Map[Int,Label].

    Read the article

  • jQuery slider widget background -- change dynamicaly

    - by publicRavi
    I use a custom background for my slider by overriding the CSS: .ui-widget-content {background: transparent url(../img/bg.png) no-repeat;} Slider's behavior is controlled by: $(document).ready(function() { $(".myslider5").slider({ animate: "true", step: 1, min: -1950, max: 1950, value: 0, slide: function(event, ui) { // magic happens here } }); There is a need for me to use 2 different classes for my slider DIV, based on some logic. So, myslider5 and myslider3 are the two classes. But their background images need to change too. How do I go about doing this?

    Read the article

  • Easy Slider 1.7 - Show any numerical slide as next

    - by Yourbudweiser
    I am using Easy Slider 1.7 - jQuery plugin and have made many modifications. My slider contains 7 slides, numeric navigation and next and previous arrows. The only problem is the numeric navigation. When you are on slide 1 and click slide 5, for example, all the slides scroll by, one-by-one. I am having trouble modifying the code so that whatever slide you are on, when you click another slide, it is the next one. Sample here: http://www.weiserwebworld.com/slider.html

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >