Search Results

Search found 451 results on 19 pages for 'mouseover'.

Page 16/19 | < Previous Page | 12 13 14 15 16 17 18 19  | Next Page >

  • Raphael.js map default fill colors

    - by RIDER
    I am trying to familiarize myself with raphael.js. I want to create a USA map that already has default colors for each state and those colors stay there. Here is what I came up with. If you look at AK, I'm getting the default color loaded, but if I highlight another state, the default color for AK disappears. I want AK - and other states - to stay the same color. Specifically, I don't know what is clearing out my AK full color. I think part of this statement is clearing out the fill cover when I mouseover a different state: for (var state in aus) { //aus[state].color = Raphael.getColor(); (function (st, state) { st[0].style.cursor = "pointer"; st[0].onmouseover = function () { current && aus[current].animate({fill: "#333", stroke: "#666"}, 500) && (document.getElementById(current).style.display = ""); st.animate({fill: st.color, stroke: "#ccc"}, 500); st.toFront(); R.safari(); document.getElementById(state).style.display = "block"; current = state; }; })(aus[state], state); } Any ideas where I might be going wrong?

    Read the article

  • jQuery-driven app. won't work without alert()

    - by webjawns.com
    I have seen a lot of articles on this, but none dealing with jQuery, so here I go... I am implementing a version of a script from http://javascript-array.com/scripts/jquery_simple_drop_down_menu/ into an existing application; however, I cannot get it to work without adding alert('msg...') as the first method within the $(document).ready() call. This has nothing to do with load time... no matter how long I wait, the menu does not work. Add alert(), however, and it works like a charm. var timeout = 500; var closetimer = 0; var ddmenuitem = 0; function jsddm_open() { jsddm_canceltimer(); jsddm_close(); ddmenuitem = $(this).find('ul').css('visibility', 'visible');} function jsddm_close() { if(ddmenuitem) ddmenuitem.css('visibility', 'hidden');} function jsddm_timer() { closetimer = window.setTimeout(jsddm_close, timeout);} function jsddm_canceltimer() { if(closetimer) { window.clearTimeout(closetimer); closetimer = null;}} $(document).ready(function() { $('#jsddm > li').bind('mouseover', jsddm_open) $('#jsddm > li').bind('mouseout', jsddm_timer)}); document.onclick = jsddm_close;

    Read the article

  • mediaelement.js play/pause on click controls don't work

    - by iKode
    I need to play and pause the video player if any part of the video is clicked, so I implemented something like: $("#promoPlayer").click(function() { $("#promoPlayer").click(function() { if(this.paused){ this.play(); } else { this.pause(); } }); ...but now the controls of the video won't pause/play. You can see it in action here(http://175.107.134.113:8080/). The video is the second slide on the main carousel at the top. I suspect I'm now getting 2 onclick events one from my code above and a second on the actual pause/play button. I don't understand how the actual video controls work, because when I inspect the element, I just see a tag. If I could differentiate the controls, then perhaps I might have figured out a solution by now. Anyone know how I should have done this, or is my solution ok. If my solutions ok, how do I intercept a click on the control, so that I only have one click event to pause / play? If you look on the media element home page, they have a big play button, complete with mouseOver, but I can't see how they have done that? Can someone else help?

    Read the article

  • Silverlight MVVM Confusion: Updating Image Based on State

    - by senfo
    I'm developing a Silverlight application and I'm trying to stick to the MVVM principals, but I'm running into some problems changing the source of an image based on the state of a property in the ViewModel. For all intents and purposes, you can think of the functionality I'm implementing as a play/pause button for an audio app. When in the "Play" mode, IsActive is true in the ViewModel and the "Pause.png" image on the button should be displayed. When paused, IsActive is false in the ViewModel and "Play.png" is displayed on the button. Naturally, there are two additional images to handle when the mouse hovers over the button. I thought I could use a Style Trigger, but apparently they're not supported in Silverlight. I've been reviewing a forum post with a question similar to mine where it's suggested to use the VisualStateManager. While this might help with changing the image for hover/normal states, the part missing (or I'm not understanding) is how this would work with a state set via the view model. The post seems to apply only to events rather than properties of the view model. Having said that, I also haven't successfully completed the normal/hover affects, either. Below is my Silverlight 4 XAML. It should also probably be noted I'm working with MVVM Light. <UserControl x:Class="Foo.Bar.MyUserControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" mc:Ignorable="d" d:DesignHeight="100" d:DesignWidth="200"> <UserControl.Resources> <Style x:Key="MyButtonStyle" TargetType="Button"> <Setter Property="IsEnabled" Value="true"/> <Setter Property="IsTabStop" Value="true"/> <Setter Property="Background" Value="#FFA9A9A9"/> <Setter Property="Foreground" Value="#FF000000"/> <Setter Property="MinWidth" Value="5"/> <Setter Property="MinHeight" Value="5"/> <Setter Property="Margin" Value="0"/> <Setter Property="HorizontalAlignment" Value="Left" /> <Setter Property="HorizontalContentAlignment" Value="Center"/> <Setter Property="VerticalAlignment" Value="Top" /> <Setter Property="VerticalContentAlignment" Value="Center"/> <Setter Property="Cursor" Value="Hand"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="Button"> <Grid> <Image Source="/Foo.Bar;component/Resources/Icons/Bar/Play.png"> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="Active"> <VisualState x:Name="MouseOver"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Source" Storyboard.TargetName="/Foo.Bar;component/Resources/Icons/Bar/Play_Hover.png" /> </Storyboard> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> </Image> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> </UserControl.Resources> <Grid x:Name="LayoutRoot" Background="White"> <Button Style="{StaticResource MyButtonStyle}" Command="{Binding ChangeStatus}" Height="30" Width="30" /> </Grid> </UserControl> What is the proper way to update images on buttons with the state determined by the view model? Update I changed my Button to a ToggleButton hoping I could use the Checked state to differentiate between play/pause. I practically have it, but I ran into one additional problem. I need to account for two states at the same time. For example, Checked Normal/Hover and Unchecked Normal/Hover. Following is my updated XAML: <UserControl x:Class="Foo.Bar.MyUserControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" mc:Ignorable="d" d:DesignHeight="100" d:DesignWidth="200"> <UserControl.Resources> <Style x:Key="MyButtonStyle" TargetType="ToggleButton"> <Setter Property="IsEnabled" Value="true"/> <Setter Property="IsTabStop" Value="true"/> <Setter Property="Background" Value="#FFA9A9A9"/> <Setter Property="Foreground" Value="#FF000000"/> <Setter Property="MinWidth" Value="5"/> <Setter Property="MinHeight" Value="5"/> <Setter Property="Margin" Value="0"/> <Setter Property="HorizontalAlignment" Value="Left" /> <Setter Property="HorizontalContentAlignment" Value="Center"/> <Setter Property="VerticalAlignment" Value="Top" /> <Setter Property="VerticalContentAlignment" Value="Center"/> <Setter Property="Cursor" Value="Hand"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="ToggleButton"> <Grid> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="CommonStates"> <VisualState x:Name="Normal"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Pause"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Collapsed</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> <VisualState x:Name="MouseOver"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="PlayHover"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Visible</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Play"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Collapsed</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> </VisualStateGroup> <VisualStateGroup x:Name="CheckStates"> <VisualState x:Name="Checked"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Pause"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Visible</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Play"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Collapsed</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="PlayHover"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Collapsed</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> <VisualState x:Name="Unchecked" /> </VisualStateGroup> </VisualStateManager.VisualStateGroups> <Image x:Name="Play" Source="/Foo.Bar;component/Resources/Icons/Bar/Play.png" /> <Image x:Name="Pause" Source="/Foo.Bar;component/Resources/Icons/Bar/Pause.png" Visibility="Collapsed" /> <Image x:Name="PlayHover" Source="/Foo.Bar;component/Resources/Icons/Bar/Play_Hover.png" Visibility="Collapsed" /> <Image x:Name="PauseHover" Source="/Foo.Bar;component/Resources/Icons/Bar/Pause_Hover.png" Visibility="Collapsed" /> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> </UserControl.Resources> <Grid x:Name="LayoutRoot" Background="White"> <ToggleButton Style="{StaticResource MyButtonStyle}" IsChecked="{Binding IsPlaying}" Command="{Binding ChangeStatus}" Height="30" Width="30" /> </Grid> </UserControl>

    Read the article

  • Created function not found

    - by skerit
    I'm trying to create a simple function, but at runtime firebug says the function does not exist. Here's the function code: <script type="text/javascript"> function load_qtip(apply_qtip_to) { $(apply_qtip_to).each(function(){ $(this).qtip( { content: { // Set the text to an image HTML string with the correct src URL to the loading image you want to use text: '<img class="throbber" src="/projects/qtip/images/throbber.gif" alt="Loading..." />', url: $(this).attr('rel'), // Use the rel attribute of each element for the url to load title: { text: 'Nieuwsbladshop.be - ' + $(this).attr('tooltip'), // Give the tooltip a title using each elements text //button: 'Sluiten' // Show a close link in the title } }, position: { corner: { target: 'bottomMiddle', // Position the tooltip above the link tooltip: 'topMiddle' }, adjust: { screen: true // Keep the tooltip on-screen at all times } }, show: { when: 'mouseover', solo: true // Only show one tooltip at a time }, hide: 'mouseout', style: { tip: true, // Apply a speech bubble tip to the tooltip at the designated tooltip corner border: { width: 0, radius: 4 }, name: 'light', // Use the default light style width: 250 // Set the tooltip width } }) } } </script> And I'm trying to call it here: <script type="text/javascript"> // Create the tooltips only on document load $(document).ready(function() { load_qtip('#shopcarousel a[rel]'); // Use the each() method to gain access to each elements attributes }); </script> What am I doing wrong?

    Read the article

  • jQuery carousel clicks update <select> list's "selected" option to match clicked item's title attrib

    - by Scott B
    The code below allows me to change a preview image outside the carousel widget so that it matches the element under the mouse. For example, if the user mouses over image2's thumbnail, the script updates .selectedImage so that it displays image2's full size version. I'd like to enhance it so that the #myThumbs options listing updates its "selected" option to match the carousel image that receives a click. Mouseover changes the preview image and click changes the select list to match the same name. The items in the carousel will have the same title attribute as the items in the select list, so I would expect that I can pass that value from the carousel to the select list. $(function() { $("#carousel").jCarouselLite({ btnNext: ".next", btnPrev: ".prev", visible: 6, mouseWheel: true, speed: 700 }); $('#carousel').show(); $('#carousel ul li').hover(function(e) { var img_src = $(this).children('img').attr('src'); $('.selectedImage img').attr('src',img_src); } ,function() { $('.selectedImage img').attr('src', '<?php echo $selectedThumb; ?>');}); }); <select id="myThumbs"> <option>image1</option> <option selected="selected">image2</option> <option>image3</option> </select>

    Read the article

  • set/clear interval issue

    - by 3gwebtrain
    HI, i am using the following code to show a link which is inside the li element. the constrain is, once the mouse enter into li element, and if it's stay inside 3sec, then it need to show. once i leave from li element, immateriality it should hide. for this, i am using : var showTimeOut; var thisElement $('.user-list li').live('mouseover',function(){ thisElement = $(this).children('a.copier-link'); showTimeOut = setInterval(function(){ thisElement.css({'display':'block'}); },3000); }) $('.user-list li').live('mouseleave',function(){ clearInterval(showTimeOut); thisElement.hide(); }) It's work fine. But the problem is, while i cross the li element with just a second, even the interval is calling, and showing the link. but i need to show only, if i stay inside 3sec and it need to hide there after, again i stay back 3sec. anything wrong with my code?, else any one give me the best suggestion? Thanks.

    Read the article

  • how to use javascript to change div backgroundColor

    - by lanqy
    The html below: <div id="catestory"> <div class="content"> <h2>some title here</h2> <p>some content here</p> </div> <div class="content"> <h2>some title here</h2> <p>some content here</p> </div> <div class="content"> <h2>some title here</h2> <p>some content here</p> </div> </div> when mouseover the content of div then it's backgroundColor and the h2(inside this div) backgroundColor change(just like the css :hover) I know this can use css (:hover) to do this in modern browser but IE6 does't work how to use javascript(not jquery or other js framework) to do this? Edit:how to change the h2 backgroundColor too

    Read the article

  • jQuery expanding menu

    - by Milen
    Hi everybody, i have this html code: <ul id="nav"> <li>Heading 1 <ul> <li>Sub page A</li> <li>Sub page B</li> <li>Sub page C</li> </ul> </li> <li>Heading 2 <ul> <li>Sub page D</li> <li>Sub page E</li> <li>Sub page F</li> </ul> </li> </ul> With this JS code: $(function(){ $('#nav>li>ul').hide(); $('#nav>li').mouseover(function(){ if ($('#nav ul:animated').size() == 0) { $heading = $(this); $expandedSiblings = $heading.siblings().find('ul:visible'); if ($expandedSiblings.size() > 0) { $expandedSiblings.slideUp(500, function(){ $heading.find('ul').slideDown(500); }); } else { $heading.find('ul').slideDown(1000); } } }); }) For now the code works this way: When click on Heading 1, menu is expanded. When click on Heading 2, heading2 submenu menu is expanded and heading 1 submenu is closed. I need to rework it to this: Submenus must be closed automatically on mouseout. Can somebody help me? Thanks in advance!

    Read the article

  • What do you call the highlight as you hover over an OPTION in a SELECT, and how can I "un"highlight

    - by devils-avacado
    I'm working on dropdowns in IE6 (SELECT with OPTIONs as children). I'm experiencing the problem where, in IE6, dropdown menus are truncated to the width of the SELECT element. I used this jquery to fix it: var css_expanded = { 'width' : 'auto', 'position' : 'absolute', 'left' : '564px', 'top' : '393px' } var css_off = { 'width' : '190px', 'position' : 'relative', 'left' : '0', 'top' : '0' } if($.browser.msie) { $('#dropdown') .bind('mouseover', function() { $(this).css(css_expanded); }) .bind('click', function() { $(this).toggleClass('clicked'); }) .bind('mouseout', function() { if (!$(this).hasClass('clicked')) { $(this).css(css_off); } }) .bind('change blur focusout', function() { $(this).removeClass('clicked') .css(css_off) }); }; It works fine in IE7+8, but in IE6, if the user clicks on a SELECT and does not click any OPTION but instead clicks somewhere else on the page, outside the SELECT (blur), the SELECT still has a "highlight", the same as if they were hovering over an OPTION with my mouse (in my case, a blue color), and the width is not restored until the user clicks outside the SELECT a second time. In other browsers, blur causes every OPTION to not be highlighted. Using JS, how can I de-highlight an option after the dropdown has lost focus.

    Read the article

  • How can i change background image of a button when hover or click in XAML for Windows 8?

    - by apero
    I got a question about changing the background image of a button when it's clicked. I tried searching on google but i couldn't find something that worked for me. Well here's my code <Button Grid.Column="0" Grid.Row="0" x:Name="btnHome" VerticalAlignment="Stretch" BorderBrush="{x:Null}" HorizontalAlignment="Stretch" Click="btnHome_Click" PointerEntered="btnHome_PointerEntered"> <Button.Template> <ControlTemplate TargetType="Button"> <Border x:Name="RootElement"> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="CommonStates"> <VisualState x:Name="MouseOver"> <Storyboard> //I want my background change here </Storyboard> </VisualState> <VisualState x:Name="Pressed"> <Storyboard> //And here </Storyboard> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> <Border.Background> <ImageBrush ImageSource="images/back_button.png"/> </Border.Background> </Border> </ControlTemplate> </Button.Template> </Button> i also tried this private void btnHome_PointerEntered(object sender, PointerRoutedEventArgs e) { BitmapImage bmp = new BitmapImage(); Uri u = new Uri("ms-appx:images/back_button_mouseover.png", UriKind.RelativeOrAbsolute); bmp.UriSource = u; ImageBrush i = new ImageBrush(); i.ImageSource = bmp; btnHome.Background = i; } But unfortunately this worked neither

    Read the article

  • Show content with fancybox like a Javascript Alert

    - by Ron Lens
    I try to show the content from a PHP-file in a fancybox but I can't handle it. Now it's the following situation: If a file permission problem occures a <div id="error"> is shown on the website. I'd like to have the content from <div id="error"> in fancybox. Everything I try I get the notice "The requested content cannot be loaded. Please try again later." That means the fancybox, it the file permission error occures, should be shown when the page is loading and not like usual shown when some events like click or mouseover. For example, if the error exists, the following content should be shown in the fancybox: <div style="width:100px; height:100px; background:#f00;"> <p>Failure</p> </div> This snippet is located in a file security_check.php. Now there are two possibilities. The 1st is to load the security_check.php directly into the fancybox or to put in the mentioned above snippet. So: how to load file contents into the fancybox?

    Read the article

  • [jQuery UI - Accordion] Styling active header?

    - by RC
    Hi, Simple issue: I am using Accordion without any UI themes (just barebones, using my own CSS). So far, so good, except that I cannot figure out how to set an "active" style for the currently selected header. The jQuery code: $("#menu").accordion({ event:"mouseover",header:"a.top" }); The HTML code: <a href="#" class="top">XXX1</a> <div class="sub"> <a href="#">Subheading 1</a> <a href="#">Subheading 2</a> <a href="#">Subheading 3</a> </div> <a href="#" class="top">XXX2</a> <div class="sub"> <a href="#">Subheading 1</a> <a href="#">Subheading 2</a> <a href="#">Subheading 3</a> </div> This works great, except that I cannot find a way to define the styles for the active header without using ThemeRoller. Manually setting the following styles in my CSS has no effect: .ui-state-active .ui-widget-content .ui-state-active .ui-state-active a .ui-state-active a:link .ui-state-active a:visited Assistance, please?

    Read the article

  • How do I tell whether my IE is 64-bit? (For that matter, Java too?)

    - by user225626
    Millions of questions already on the web about how to tell whether the OS is 64-bit, but not whether IE and/or Java runtime is 64-bit. Some background: I installed 64-bit Win 7, and IE installed automatically with it from CD; I didn't download IE. I did download Java runtime. Mouseover tips in Control Panel!Programs shows it as: "Java 32-bit Java(TM) Control Panel" Then I went to http://java.com/en/download/manual.jsp and that page says... We have detected you may be viewing this page in a 32-bit browser. If you use 32-bit and 64-bit browsers interchangeably, you will need to install both 32-bit and 64-bit Java in order to have the Java plug-in for both browsers. But I cannot tell in the aftermath whether my Java is 64-bit. Evidently the "Java(TM) Control Panel" is, but I don't know if that's the same as the runtime. (I'm afraid to ask on the offical Java forums, because they're such a-holes.) Also, How do I issue a command to the OS to tell whether this IE is 64-bit? Help!About doesn't say on that. Thanks.

    Read the article

  • JQUERY - how Two elements - IMG - DIV when hover over IMG show/hide the DIV - added with hover hide/

    - by Jan Fosgerau
    Im very new to the wonder that is jquery. and i just figure out how to make my img buttons show/hide with a opacity difference (as such) <script type="text/javascript"> <![CDATA[ $(".ExcommKnap").mouseover(function () { $(this).stop().fadeTo('fast', 0.5, function(){}) }); $(".ExcommKnap").mouseout(function () { $(this).stop().fadeTo('fast', 1.0, function(){}) }); ]]> </script> which is good and all. but i also need to make the button when hovered over show text just above it that is specific to that button. i made these here elements that are looped in a for each. <div style="top:10px; width:755px;text-align:right; position:absolute; "> <div id="Page-{@id}" class="headlinebox"> <xsl:value-of select="@nodeName"/> </div> </div> <a href="{umbraco.library:NiceUrl(@id)}"> <img class="ExcommKnap" src="{$media/data[@alias='umbracoFile']}" /> </a> i need to make the individual text appear when hovered over its button. hence i have the id="page-{@id}" looped out along and need to get this place in the jquery code i presume. so when i hover over a img class="ExcommKnap" it makes the correct text visible. But i need the div id="page-{id}" to be invisible to begin with on pageload and then visible when its button is being hovered over. can anyone help ?

    Read the article

  • Opencv video frame not showing Sobel output

    - by user1016950
    This is a continuation question from Opencv video frame giving me an error I think I closed it off, Im new to Stackoverflow. I have code below that Im trying to see its Sobel edge image. However the program runs but the output is just a grey screen where if I mouseover the cursor disappears. Does anyone see the error? or is it a misunderstanding about the data structures Im using IplImage *frame, *frame_copy = 0; // capture frames from video CvCapture *capture = cvCaptureFromFile( "lightinbox1.avi"); //Allows Access to video propertys cvQueryFrame(capture); //Get the number of frames int nframe=(int) cvGetCaptureProperty(capture,CV_CAP_PROP_FRAME_COUNT); //Name window cvNamedWindow( "video:", 1 ); //start loop for(int i=0;i<nframe;i++){ //prepare capture frame extraction cvGrabFrame(capture); cout<<"We are on frame "<<i<<"\n"; //Get this frame frame = cvRetrieveFrame( capture ); con2txt(frame); frame_copy = cvCreateImage(cvSize(frame->width,frame->height),IPL_DEPTH_8U,frame->nChannels ); //show and destroy frame cvCvtColor( frame,frame,CV_RGB2GRAY); //Create Sobel output frame_copy1 = cvCreateImage(cvSize(frame->width,frame->height),IPL_DEPTH_16S,1 ); cvSobel(frame_copy,frame_copy1,2,2,3); cvShowImage("video:",frame_copy1); cvWaitKey(33);} cvReleaseCapture(&capture);

    Read the article

  • jQuery only apply to current li

    - by kylex
    I want to slide toggle the second level ul when I mouse over the relevant first level li. Currently the script displays all secondary ul on a mouseover. <div id="subNav"> <ul> <li>One</li> <ul> <li>SubOne</li> </ul> </li> <li>Two</li> <li> <ul> <li>SubTwo</li> </ul> </li> </ul> </div> And here is my jQuery $("#sideNav ul li").hover( function(){ $('#sideNav ul li ul').slideDown(); }, function(){ $('#sideNav ul li ul').slideUp(); } );

    Read the article

  • jQuery API counter++ pause on hover and then resume

    - by Rory
    I need to have this counter pause {stay on current div) while mouseover or hover and resume counter when mouseout. I have tried many ways but still new to jQuery API. <div id="slide_holder"> <div id="slide1" class="hidden"> <img src="images/crane2.jpg" class="fill"> </div> <div id="slide2" class="hidden"> <img src="images/extend_boom.png" class="fill"> </div> <div id="slide3" class="hidden"> <img src="images/Transformers-Bumblebee.jpg" class="fill"> </div> <script> $(function () { var counter = 0, divs = $('#slide1, #slide2, #slide3'); function showDiv () { divs.hide() // hide all divs .filter(function (index) { return index == counter % 3; }) // figure out correct div to show .fadeIn('slow'); // and show it counter++; }; // function to loop through divs and show correct div showDiv(); // show first div setInterval(function () { showDiv(); // show next div }, 3 * 1000); // do this every 10 seconds }); </script>

    Read the article

  • C# generics with MVVM, pulling the T out of <T>

    - by bufferz
    My Model is a generic class that contains a (for example) Value property which can be int, float, string, bool, etc. So naturally this class is represented something like Model<T>. For the sake of collections Model<T> implements the interface IModel, although IModel is itself empty of any content. My ViewModel contains and instance of Model<T> and it is passed in through ViewModel's constructor. I still want to know what T is in ViewModel, so when I expose Model to the View I know the datatype of Model's buried Value property. The class for ViewModel ends up looking like the following: class ViewModel<T> { private Model<T> _model; public ViewModel(Model<T> model) { ....blah.... } public T ModelsValue {get; set; } } This works fine, but is limited. So now I need to expose a collection of IModels with varying Ts to my View, so I'm trying to set up an ObservableCollection of new ViewModel<T>s to a changing list of IModels. The problem is, I can't figure out how to get T from Model<T> from IModel to construct ViewModel<T>(Model<T>) at runtime. In the VS2010 debugger I can mouseover any IModel object and see its full Model<int> for example at runtime so I know the data is in there. Any ideas?

    Read the article

  • Dynamic content in a Gridview

    - by mariki
    I have a gridview with couple of columns,I want to achieve the following: If user is NOT authorized display normal columns. If user IS authorized: set mouseover event for first column text and display some buttons (that are not available for NOT authorized users) in a second column when user hover over(using javascript) the first column. I am have 2 difficulties: The first one where and when should I create the buttons? I have 2 options, I can create those button on design time, in gridviews template and just set Visible value to false and then in codebehind set it to true if user is authorized. The second option would be creating this buttons dynamically in gridview_RowCreated event (or any other event) if user is authorized. The Second difficulty is setting the javascript event to show the buttons, the event should be added only if user is authorized! Note that event and buttons should have some kind of id match for Javascript function to know what should it hide/unhide when event is triggered. What should I do, what is the best practice? I know this is a long question, but please try to help :)

    Read the article

  • Why null reference exception in SetMolePublicInstance?

    - by OldGrantonian
    I get a "null reference" exception in the following line: MoleRuntime.SetMolePublicInstance(stub, receiverType, objReceiver, name, null); The program builds and compiles correctly. There are no complaints about any of the parameters to the method. Here's the specification of SetMolePublicInstance, from the object browser: SetMolePublicInstance(System.Delegate _stub, System.Type receiverType, object _receiver, string name, params System.Type[] parameterTypes) Here are the parameter values for "Locals": + stub {Method = {System.String <StaticMethodUnitTestWithDeq>b__0()}} System.Func<string> + receiverType {Name = "OrigValue" FullName = "OrigValueP.OrigValue"} System.Type {System.RuntimeType} objReceiver {OrigValueP.OrigValue} object {OrigValueP.OrigValue} name "TestString" string parameterTypes null object[] I know that TestString() takes no parameters and returns string, so as a starter to try to get things working, I specified "null" for the final parameter to SetMolePublicInstance. As already mentioned, this compiles OK. Here's the stack trace: Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.ExtendedReflection.Collections.Indexable.ConvertAllToArray[TInput,TOutput](TInput[] array, Converter`2 converter) at Microsoft.Moles.Framework.Moles.MoleRuntime.SetMole(Delegate _stub, Type receiverType, Object _receiver, String name, MoleBindingFlags flags, Type[] parameterTypes) at Microsoft.Moles.Framework.Moles.MoleRuntime.SetMolePublicInstance(Delegate _stub, Type receiverType, Object _receiver, String name, Type[] parameterTypes) at DeqP.Deq.Replace[T](Func`1 stub, Type receiverType, Object objReceiver, String name) in C:\0VisProjects\DecP_04\DecP\DeqC.cs:line 38 at DeqPTest.DecCTest.StaticMethodUnitTestWithDeq() in C:\0VisProjects\DecP_04\DecPTest\DeqCTest.cs:line 28 at Starter.Start.Main(String[] args) in C:\0VisProjects\DecP_04\Starter\Starter.cs:line 14 Press any key to continue . . . To avoid the null parameter, I changed the final "null" to "parameterTypes" as in the following line: MoleRuntime.SetMolePublicInstance(stub, receiverType, objReceiver, name, parameterTypes); I then tried each of the following (before the line): int[] parameterTypes = null; // if this is null, I don't think the type will matter int[] parameterTypes = new int[0]; object[] parameterTypes = new object[0]; // this would allow for various parameter types All three attempts produce a red squiggly line under the entire line for SetMolePublicInstance Mouseover showed the following message: The best overloaded method match for 'Microsoft.Moles.Framework.Moles.MoleRuntime.SetMolePublicInstance(System.Delegate, System.Type, object, string, params System.Type[])' has some invalid arguments. I'm assuming that the first four arguments are OK, and that the problem is with the params array.

    Read the article

  • Grid related UI design question

    - by younevertell
    Grid related UI design question I want some 16-grid (4 rows and 4 columns) user interface, and fill the grid with some round shapes. I also want to use the MouseOver, mouse left button down, and Mouse Left Button Up events to set the state of grids as selected or not selected. My questions: 1. How fill the grid with some round shapes? by SetColumn and SetRow? 2. How to make the grids respond to the mouse please? Thanks <Grid.ColumnDefinitions> <ColumnDefinition /> <ColumnDefinition /> <ColumnDefinition /> <ColumnDefinition /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition /> <RowDefinition /> <RowDefinition /> <RowDefinition /> </Grid.RowDefinitions>

    Read the article

  • Cannot access objects in associative arrays using jQuery

    - by Sixfoot Studio
    I am trying to create and array of objects so that I can access them in a for loop in jQuery and I know that this works in Actionscript so what I am trying to do is convert my current knowledge to jQuery that will work. Please have a look at this and tell me why I cannot access divToShow Thanks guys var homeImages = new Array(); homeImages[0] = { hoverImage: ".leftColImage1", divToShow: ".image1", rollOverImg: "img-family-over.jpg" }; homeImages[1] = { hoverImage: ".leftColImage2", divToShow: ".image2", rollOverImg: "img-students-over.jpg" }; homeImages[2] = { hoverImage: ".leftColImage3", divToShow: ".image3", rollOverImg: "img-pros-over.jpg" }; homeImages[3] = { hoverImage: ".leftColImage4", divToShow: ".image4", rollOverImg: "img-retired-over.jpg" }; var hoverImage; var activeDiv; var mainContent = ".mainContent"; for (k = 0; k < homeImages.length; k++) { homeImages[k].id = k; $(homeImages[k].hoverImage).mouseover(function() { //alert("divToShow : " + homeImages[this.id].divToShow); alert("this : " + this.id); activeDiv = homeImages[k].divToShow; $(".leftColImage1 img").attr("src", "/App_Themes/MyChoice2010/Images/" + homeImages[k].rollOverImg); $(mainContent).hide(); $(homeImages[k].divToShow).slideDown("slow"); }).mouseout(function() { $(".leftColImage1 img").attr("src", "/App_Themes/MyChoice2010/Images/img-family.jpg"); $(".image1").hide(); $(mainContent).slideDown("slow"); }); }

    Read the article

  • jQuery - Moving background arrow in menu

    - by B M
    I would expect something like this to be pretty popular in demand but I had much trouble finding a suiting script. I've got a basic menu build like this: <div id="menu"> <ul> <li><a href="#"><img src="images/btn1.png"></a></li> <li><a href="#"><img src="images/btn2.png"></a></li> <li><a href="#"><img src="images/btn3.png"></a></li> </ul> </div> The div #menu has a background image of a small arrow. I want the arrow to move vertically in front of the corresponding menu image when you mouseover/mousemove the whole #menu div. Also when one of the menu images has been clicked the arrow should stay in it's position in front of the corresponding menu image. I started something but I notice it's going downwards, since it's only working when you're at the top of the page. What I have is this: $('#menu').css({backgroundPosition: '5px 10px'}); //Starting position $('#menu').mousemove(function(e){ $('#menu').stop().animate( {backgroundPosition: '5px ' + (e.pageY-60) + ' px'}, {duration:100} ) }).mouseout(function(){ $('#menu').stop().animate( {backgroundPosition: '5px 10px'}, {duration:100} ) }); Please help! ps. I'm using this plugin to move background images smoothly.

    Read the article

  • Java scripts conflict on my home page

    - by naveen
    <script type="text/javascript" src="jquery-1.js"></script> <script type="text/javascript" src="mootools.js"></script> <script type="text/javascript" src="slideshow.js"></script> <script type="text/javascript"> //<![CDATA[ window.addEvent('domready', function(){ var data = { '1.jpg': { caption: 'Volcano Asención in Ometepe, Nicaragua.' }, '2.jpg': { caption: 'A Ceibu tree.' }, '3.jpg': { caption: 'The view from Volcano Maderas.' }, '4.jpg': { caption: 'Beer and ice cream.' } }; var myShow = new Slideshow('show', data, {controller: true, height: 400, hu: 'images/', thumbnails: true, width: 500}); }); //]]> </script> <script type="text/javascript"> $(document).ready(function() { //slides the element with class "menu_body" when paragraph with class "menu_head" is clicked $("#firstpane p.menu_head").click(function() { $(this).css({backgroundImage:"url(down.png)"}).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow"); $(this).siblings().css({backgroundImage:"url(left.png)"}); }); //slides the element with class "menu_body" when mouse is over the paragraph $("#secondpane p.menu_head").mouseover(function() { $(this).css({backgroundImage:"url(down.png)"}).next("div.menu_body").slideDown(500).siblings("div.menu_body").slideUp("slow"); $(this).siblings().css({backgroundImage:"url(left.png)"}); }); }); </script> <!--[if lt IE 7]> <script type="text/javascript" src="unitpngfix.js"></script> <![endif]-->

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19  | Next Page >