Search Results

Search found 673 results on 27 pages for 'opacity'.

Page 10/27 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • How to paint fully transparent pixels/points in P2D mode?

    - by netzwerg
    According to the Processing Reference, stroke(gray, alpha) allows to set the color and opacity of the stroke. With the default color mode, an alpha value of 255 denotes full opacity, while a value of 0 should correspond to complete transparency. While this works with the (default) JAVA2D renderer, I can't seem to paint fully transparent points in P2D mode. This code clearly renders a pixel at the center of the canvas, even though the alpha value is set to 0 (fully transparent): public class Transparency extends PApplet { @Override public void setup() { size(200, 200, P2D); } @Override public void draw() { stroke(0, 0); point(width / 2, height / 2); } public static void main(String[] args) { PApplet.main(new String[] { Transparency.class.getSimpleName() }); } } What's wrong here?

    Read the article

  • How to change image through click - javascript

    - by Elmir Kouliev
    I have a toolbar that has 5 table cells. The first cell looks clear, and the other 4 have a shade over them. I want to make it so that clicking on the table cell will also change the image so that the shade will also change in respect to the current table cell that is selected. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <title>X?B?RL?R V? HADIS?L?R</title> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link rel="stylesheet" href="N&SAz.css" /> <link rel="shortcut icon" href="../../Images/favicon.ico" /> <script type="text/javascript"> var switchTo5x = true; </script> <script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script> <script type="text/javascript"> stLight.options({ publisher: "581d0c30-ee9d-4c94-9b6f-a55e8ae3f4ae" }); </script> <script src="../../jquery-1.7.2.min.js" type="text/javascript"> </script> <script type="text/javascript"> $(document).ready(function () { $(".fade").css("display", "none"); $(".fade").fadeIn(20); $("a.transition").click(function (event) { event.preventDefault(); linkLocation = this.href; $("body").fadeOut(500, redirectPage); }); function redirectPage() { window.location = linkLocation; } }); $(document).ready(function () { $('.preview').hide(); $('#link_1').click(function () { $('#latest_story_preview1').hide(); $('#latest_story_preview2').hide(); $('#latest_story_preview3').hide(); $('#latest_story_preview4').hide(); $('#latest_story_main').fadeIn(800); }); $('#link_2').click(function () { $('#latest_story_main').hide(); $('#latest_story_preview2').hide(); $('#latest_story_preview3').hide(); $('#latest_story_preview4').hide(); $('#latest_story_preview1').fadeIn(800); }); $('#link_3').click(function () { $('#latest_story_main').hide(); $('#latest_story_preview1').hide(); $('#latest_story_preview3').hide(); $('#latest_story_preview4').hide(); $('#latest_story_preview2').fadeIn(800); }); $('#link_4').click(function () { $('#latest_story_main').hide(); $('#latest_story_preview1').hide(); $('#latest_story_preview2').hide(); $('#latest_story_preview4').hide(); $('#latest_story_preview3').fadeIn(800); }); $('#link_5').click(function () { $('#latest_story_main').hide(); $('#latest_story_preview1').hide(); $('#latest_story_preview2').hide(); $('#latest_story_preview3').hide(); $('#latest_story_preview4').fadeIn(800); }); $(".fade").css("display", "none"); $(".fade").fadeIn(1200); $("a.transition").click(function (event) { event.preventDefault(); linkLocation = this.href; $("body").fadeOut(500, redirectPage); }); }); </script> </head> <body id="body" style="background-color:#FFF;" onload="document"> <div style="margin:0px auto;width:1000px;" id="all_content"> <div id="top_content" style="background-color:transparent;"> <ul id="translation_list"> <li> <a href=""> AZ </a> </li> <li> <a href="#"> RUS </a> </li> <li> <a href="#"> ENG </a> </li> </ul> <div id="share_buttons"> <span class='st_facebook' displayText='' title="Facebook"></span> <span class='st_twitter' displayText='' title="Twitter"></span> <span class='st_linkedin' displayText='' title="Linkedin"></span> <span class='st_googleplus' displayText='' title="Google +"></span> <span class='st_email' displayText='' title="Email"></span> </div> <img src="../../Images/RasulGuliyev.png" width="330" height="80" id="top_logo"> <br /> <br /> <div class="fade" id="navigation"> <ul> <font face="Verdana, Geneva, sans-serif"> <li> <a href="../../index.html"> ANA S?HIF? </a> </li> <li> <a href="../biographyAZ.html"> BIOQRAFIYA </a> </li> <li style="background-color:#9C1A35;"> <a href="#"> X?B?RL?R V? HADIS?L?R </a> </li> <li> <a> PROQRAM </a> </li> <li> <a> SEÇICIL?R </a> </li> <li> <a> ?LAQ?L?R</a> </li> </font> </ul> </div> <font face="Tahoma, Geneva, sans-serif"> <br /> <div id="navigation2"> <ul> <a> <li><i> HADIS?L?R </i></li> </a> <a> <li><i>VIDEOLAR</i> </li> </a> </ul> </div> <div id="news_section" style="background-color:#FFF;"> <h3 style="font-weight:100; font-size:22px; font-style:normal; color:#7C7C7C;">Son X?b?rl?r</h3> <div class="fade" id="Latest-Stories"> <table id="stories-preview" width="330" height="598" border="0" cellpadding="0" cellspacing="0"> <tr> <td> <a id="link_1" href="#"><img src="../../Images/N&EImages/images/Article-Nav-Bar1_01.gif" width="330" height="114" alt=""></a> </td> </tr> <tr> <td> <a id="link_2" href="#"> <img src="../../Images/N&EImages/images/Article-Nav-Bar1_02.gif" width="330" height="109" alt=""> </a> </td> </tr> <tr> <td> <a id="link_3" href="#"> <img src="../../Images/N&EImages/images/Article-Nav-Bar1_03.gif" width="330" height="132" alt=""></a> </td> </tr> <tr> <td> <a id="link_4" href="#"><img src="../../Images/N&EImages/images/Article-Nav-Bar1_04.gif" width="330" height="124" alt=""></a> </td> </tr> <tr> <td> <a id="link_5" href="#"><img src="../../Images/N&EImages/images/Article-Nav-Bar1_05.gif" width="330" height="119" alt=""></a> </td> </tr> </table> <div class="fade" id="latest_story_main"> <!--START--> <img src="../../Images/N&EImages/GuliyevFace.jpeg" style="padding:4px; margin-top:6px; border-style:groove; border-width:thin; margin-left:90px;" /> <a href="#"> <h2 style="font-weight:100; font-style:normal;"> "Bizim V?zif?miz Az?rbaycan Xalqinin T?zyiq? M?ruz Qalmamasini T?min Etm?kdir" </h2> </a> <h5 style="font-weight:100; font-size:12px; color:#888; opacity:.9;"> <img src="../../Images/ClockImage.png" />IYUN 19, 2012 BY RASUL GULIYEV - R?SUL QULIYEV</h5> <p style="font-size:14px; font-style:normal;">ACP-nin v? Müqavim?t H?r?katinin lideri, eks-spiker R?sul Quliyev "Yeni Müsavat"a müsahib? verib. O, son vaxtlar ACP-d? bas ver?n kadr d?yisiklikl?ri, bar?sind? dolasan söz-söhb?tl?r v? dig?r m?s?l?l?r? aydinliq g?tirib. Müsahib?ni t?qdim edirik. – Az?rbaycanda siyasi günd?mi ?hat? ed?n m?s?l?l?rd?n biri d? Sülh?ddin ?kb?rin ACP-y? s?dr g?tirilm?sidir. Ideya v? t?s?bbüs kimin idi? – ?vv?ll?r d? qeyd <a href="#"> [...]</a> </p> <!--FIRST STORY END --> </div> <div class="preview" id="latest_story_preview1"> <!--START--> <img src="../../Images/N&EImages/GuliyevFace2.jpeg" style="padding:4px; margin-top:6px; border-style:groove; border-width:thin; margin-left:90px;" /> <a href="#"> <h2 style="font-weight:100; font-style:normal;"> "S?xsiyy?ti Alçaldilan Insanlarin Qisasi Amansiz Olur" </h2></a> <h5 style="font-weight:100; font-size:12px; color:#888; opacity:.9;"> <img src="../../Images/ClockImage.png" />IYUN 12, 2012 BY RASUL GULIYEV - R?SUL QULIYEV</h5> <p style="font-size:14px; font-style:normal;">R?sul Quliyev: "Az?rbaycanda müxalif?tin görün?n f?aliyy?ti ?halinin hökum?td?n naraziliq potensialini ifad? etmir" Eks-spiker Avropa görüsl?rinin yekunlarini s?rh etdi ACP lideri R?sul Quliyevin Avropa görüsl?ri basa çatib. S?f?rin yekunlari bar?d? R?sul Quliyev eksklüziv olaraq "Yeni Müsavat"a açiqlama verib. Norveçd? keçiril?n görüsl?rd? Açiq C?miyy?t v? Liberal Demokrat partiyalarinin s?drl?ri Sülh?ddin ?kb?r, Fuad ?liyev v? Müqavim?t H?r?kati Avropa <a href="#"> [...]</a> </p> <!--SECOND STORY END --> </div> <div class="preview" id="latest_story_preview2"> <!--START--> <img src="../../Images/N&EImages/GuliyevFace3.jpeg" style="padding:4px; margin-top:6px; border-style:groove; border-width:thin; margin-left:90px;" /> <a href="#"> <h2 style="font-weight:100; font-style:normal;"> R?sul Quliyevin Iyunun 4, 2012-ci ild? Bryusseld?ki Görüsl?rl? ?laq?dar Çixisi </h2></a> <h5 style="font-weight:100; font-size:12px; color:#888; opacity:.9;"> <img src="../../Images/ClockImage.png" />IYUN 4, 2012 BY RASUL GULIYEV - R?SUL QULIYEV</h5> <p style="font-size:14px; font-style:normal;">Brüssel görüsl?ri – Az?rbaycanda xalqin malini ogurlayan korrupsioner Höküm?t liderl?rinin xarici banklarda olan qara pullari v? ?mlaklarinin dondurulmasina çox qalmayib. Camaatin hüquqlarini pozan polis, prokuratura v? m?hk?m? isçil?rin? v? onlarin r?hb?rl?rin? viza m?hdudiyy?tl?ri qoymaqda reallasacaq. R?sul Quliyevin Iyunun 4, 2012-ci ild? Bryusseld?ki Görüsl?rl? ?laq?dar Çixisi Rasul Guliyev's Speech on June 4, 2012 about Brussels Meetings <a href="#">[...]</a> </p> <!--THIRD STORY END --> </div> <div class="preview" id="latest_story_preview3"> <!--START--> <img src="../../Images/N&EImages/GuliyevGroup1.jpeg" style="padding:4px; margin-top:6px; border-style:groove; border-width:thin; margin-left:90px;" /> <a href="#"> <h2 style="font-weight:100; font-style:normal;"> R?sul Quliyevin Avropa Parlamentind? v? Hakimiyy?t Qurumlarinda Görüsl?ri Baslamisdir </h2></a> <h5 style="font-weight:100; font-size:12px; color:#888; opacity:.9;"> <img src="../../Images/ClockImage.png" />MAY 31, 2012 BY RASUL GULIYEV - R?SUL QULIYEV</h5> <p style="font-size:14px; font-style:normal;">Aciq C?miyy?t Partiyasinin lideri, eks-spiker R?sul Quliyev Avropa Parlamentind? görüsl?rini davam etdirir. Bu haqda "Yeni Müsavat"a R.Quliyev özü m?lumat verib. O bildirib ki, görüsl?rd? Liberal Demokrat Partiyasinin s?dri Fuad ?liyev v? R.Quliyevin Skandinaviya ölk?l?ri üzr? müsaviri Rauf K?rimov da istirak edirl?r. Eks-spiker deyib ki, bu görüsl?r 2013-cü ild? keçiril?c?k prezident seçkil?rind? saxtalasdirmanin qarsisini almaq planinin [...]</p> <!--FOURTH STORY END --> </div> <div class="preview" id="latest_story_preview4"> <!--START--> <img src="../../Images/N&EImages/GuliyevGroup2.jpeg" style="padding:4px; margin-top:6px; border-style:groove; border-width:thin; margin-left:90px;" /> <a href="#"> <h2 style="font-weight:100; font-style:normal;"> Norveçin Oslo S?h?rind? Parlament Üzvl?ri il? v? Xarici Isl?r Nazirliyind? Görüsl?r </h2></a> <h5 style="font-weight:100; font-size:12px; color:#888; opacity:.9;"> <img src="../../Images/ClockImage.png" />MAY 30, 2012 BY RASUL GULIYEV - R?SUL QULIYEV</h5> <p style="font-size:14px; font-style:normal;">R?sul Quliyev Norveçin Oslo s?h?rind? Parlament üzvl?ri v? Xarici isl?r nazirliyind? görüsl?r keçirmisdir. Bu görüsl?rd? Az?rbaycandan Liberal Demokrat Partiyasinin s?dri Fuad ?liyev, Avro-Atlantik Surasinin s?dri Sülh?ddin ?kb?r v? Milli Müqavim?t H?r?katinin Skandinaviya ölk?l?ri üzr? nümay?nd?si Rauf K?rimov istirak etmisdir. Siyasil?r ilk ?vv?l mayin 22-d? Norveç Parlamentinin Avropa Surasinda t?msil ed?n nümay?nd? hey?tinin üzvül?ri Karin S. [...]</a> </p> <!--FIFTH STORY END --> </div> <hr /> </div> <!--LATEST STORIES --> <div class="fade" id="article-section"> <h3 style="font-weight:100; font-size:22px; font-style:normal; color:#7C7C7C;">Çecin X?b?rl?r</h3> <div class="older-article"> <img src="../../Images/N&EImages/GuliyevGroup2.jpeg" style="padding:4px; margin-top:6px; border-style:groove; border-width:thin; margin-left:90px;" /> <a href="#"> <h2 style="font-weight:100; font-style:normal;"> Norveçin Oslo S?h?rind? Parlament Üzvl?ri il? v? Xarici Isl?r Nazirliyind? Görüsl?r </h2></a> <h5 style="font-weight:100; font-size:12px; color:#888; opacity:.9;"> <img src="../../Images/ClockImage.png" />MAY 30, 2012 BY RASUL GULIYEV - R?SUL QULIYEV</h5> <p style="font-size:14px; font-style:normal;">R?sul Quliyev Norveçin Oslo s?h?rind? Parlament üzvl?ri v? Xarici isl?r nazirliyind? görüsl?r keçirmisdir. Bu görüsl?rd? Az?rbaycandan Liberal Demokrat Partiyasinin s?dri Fuad ?liyev, Avro-Atlantik Surasinin s?dri Sülh?ddin ?kb?r v? Milli Müqavim?t H?r?katinin Skandinaviya ölk?l?ri üzr? nümay?nd?si Rauf K?rimov istirak etmisdir. Siyasil?r ilk ?vv?l mayin 22-d? Norveç Parlamentinin Avropa Surasinda t?msil ed?n nümay?nd? hey?tinin üzvül?ri Karin S. [...]</a> </p> </div> <hr /> </div> <!--NEWS SECTION--> </font> <h3 class="fade" id="footer">Rasul Guliyev 2012</h3> </div> </body> </head> </html>

    Read the article

  • Vertical Align Issue

    - by Nasser Hajloo
    I have following styles which work greate but Vertical-Align:middle or bottom doesn't work in it. every thing inside goes top ofthe div .Progress { display: inline-block; z-index: 1000; width:auto; height: auto; background-color: #A9C646; vertical-align: bottom; text-align: center; text-align: -moz-center; !text-align: center; position: absolute; opacity: 0.4; filter: alpha(opacity = 40); }

    Read the article

  • wpf do animation until background worker finishes its work

    - by toni
    Hi! I have an application that do some hard stuff when user clicks a start button and takes a long time. During this I would like to do some animation over a label, for example, changing opacity from 0 to 1 and vice versa and change foreground color between several colors at the same time changing opacity. I want it stops doing animation when background worker finishes its work. How can I do this? and how can I start animation and stop it from c#? Thanks very much!

    Read the article

  • trying to fade out a top div on hover to reveal working links in text below using JQuery

    - by Heath
    I need to fade a div (and image) to reveal a div underneath (text with clickable links) using jQuery. <script> $(document).ready(function(){ $("img.a").hover( function() { $(this).stop().animate({"opacity": "0"}, "slow"); }, function() { $(this).stop().animate({"opacity": "1"}, "slow"); }); }); </script> Used the above code and all worked well, until I went to click the links. Seems the top hidden div is preventing me from doing so. Tried the replaceWith function and that allowed me to click the links too - but couldn't get it to go back to showing original div when I moused out. Also, bossman wants the transition to be gradual - like a fade... Any suggestions? Many thanks! Heath

    Read the article

  • Objective-C: Protocols

    - by Stu
    I'd like an instance variable object to adopt a protocol. @interface GameScene : Scene <AVAudioPlayerDelegate> { @private Layer *content <CocosNodeOpacity>; } For example I'd like my Layer object to adopt the <CocosNodeOpacity> so that I can get the methods -(GLubyte) opacity; //and -(void) setOpacity: (GLubyte) opacity; for free. The syntax shown above is invalid. Is it possible to achieve this without creating a new implementation file and creating a custom object? Thanks.

    Read the article

  • Jlabel with alpha value

    - by jouzef19
    Hi: i have jLabel and i want to change its opacity (alpha value) each one second , i tried something like that but its not change each one second , jlable change its opacity with last alpha value . Color color = jLabel1.getBackground(); int alpha = 255; long initTime = System.currentTimeMillis(); while(true){ if(System.currentTimeMillis() - initTime >= 1000){ initTime = System.currentTimeMillis(); alpha -=1; Color color2 = new Color(color.getRed(),color.getGreen(),color.getBlue(),alpha); jLabel1.setBackground(color2); } if(alpha<=0) break; }

    Read the article

  • Problem with jQuery's fade in/out in Firefox

    - by GaVrA
    I already asked here with no luck, but feel free to read it: http://groups.google.com/group/jquery-en/browse%5Fthread/thread/fdf7a584b30d4bb9 Hmm check out my site: http://www.crtaci.info/ on top-right position i have search field. When you move your mouse over there small text shows up that says: Napredna pretraga Now, for some reason those letters change color to like yellow for very short period of time in ff 3.5 and to some strange color in safari 4.0.2 for win. In ie8, opera and chrome it works just the way it should, white letters stay white during the animation. Any sugestions? here is function that do this job ;) $('#header_search').hover(function() { $('#naprednaPretraga').stop({clearQueue:true}).show().animate({"opacity" : 1},500); }, function(){ $('#naprednaPretraga').stop({clearQueue:true}).animate({"opacity" : 0},500,function() { $('#naprednaPretraga').hide(); }); });

    Read the article

  • Work time in fullcalendar [Solution]

    - by Zozo
    Full calendar have no included options to work-time feature (selecting first and last rows in agenda view for any day - where in example company is not working). I managed something like that: viewDisplay: function(view){ $.ajax({ url: 'index.php?r=calendar/Default/worktime', dataType: 'json', success: function(data){ if(view.name=='agendaWeek') selectWorkTime(data, 30, 0, 24, false); else if(view.name=='agendaDay') selectDayWorkTime(data, 30, 0, 24, view, false); } }); } Where index.php?r=calendar/Default/worktime is php file returning json. It looks like that: $arr = array( 'mon' => array('8:00', '17:00'), 'tue' => array('9:00', '15:00'), 'wed' => array('9:30', '19:00'), 'thu' => array('6:00', '14:00'), 'fri' => array('0:00', '24:00'), 'sat' => array('9:00', '14:00'), 'sun' => array() ); foreach ($arr as &$day){ foreach($day as &$hour){ $tmp = explode(':', $hour); $hour = $tmp[0] * 3600 + $tmp[1] * 60; } } print json_encode($arr); and at the end, some functions using for counting and selecting work-time: function selectDayWorkTime(timeArray, slotMinutes, minTime, maxTime, viewObject, showAtHolidays){ var dayname; $('.fc-content').find('.fc-view-agendaWeek').find('.fc-agenda-body') .children('.fc-work-time').remove(); $('.fc-content').find('.fc-view-agendaDay') .find('.fc-work-time-day').removeClass('fc-work-time-day'); switch(viewObject.start.getDay()){ case 1: dayname='mon'; break; case 2: dayname='tue'; break; case 3: dayname='wed'; break; case 4: dayname='thu'; break; case 5: dayname='fri'; break; case 6: dayname='sat'; break; case 0: dayname='sun'; break; } for(var day in timeArray){ if(day == dayname){ if($('.fc-content').find('.fc-view-agendaDay').find('.fc-'+day).attr('class').search('fc-holiday') == -1 || showAtHolidays){ var startBefore = 0; var endBefore = timeArray[day][0] / (60 * slotMinutes) - (minTime * 60) / slotMinutes; var startAfter = timeArray[day][1] / (60 * slotMinutes) - (minTime * 60) / slotMinutes; var endAfter = (maxTime - minTime) * 60 / slotMinutes - 1; for(startBefore; startBefore < endBefore; startBefore++){ $('.fc-view-agendaDay').find('.fc-slot'+startBefore).find('div').addClass('fc-work-time-day'); } for(startAfter; startAfter <= endAfter; startAfter++){ $('.fc-view-agendaDay').find('.fc-slot'+startAfter).find('div').addClass('fc-work-time-day'); } } } } } function selectWorkTime(timeArray, slotMinutes, minTime, maxTime, showAtHolidays){ for(var day in timeArray){ var startBefore = 0; var endBefore = timeArray[day][0] / (60 * slotMinutes) - (minTime * 60) / slotMinutes; var startAfter = timeArray[day][1] / (60 * slotMinutes) - (minTime * 60) / slotMinutes; var endAfter = (maxTime - minTime) * 60 / slotMinutes - 1; if(startBefore > endBefore) endBefore = startBefore; if(startAfter > endAfter) startAfter = endAfter; try{ selectCell(startBefore, endBefore, 'fc-'+day, 'fc-work-time', false, showAtHolidays); selectCell(startAfter, endAfter, 'fc-'+day, 'fc-work-time', true, showAtHolidays); } catch(e){ continue; } } } function selectCell(startRowNo, endRowNo, collClass, cellClass, closeGap, showAtHolidays){ $('.fc-content').find('.fc-view-agendaWeek').find('.fc-agenda-body') .children('.'+cellClass+''+startRowNo+''+collClass).remove(); $('.fc-content').find('.fc-view-agendaDay') .find('.fc-work-time-day').removeClass('fc-work-time-day'); if($('.fc-content').find('.fc-view-agendaWeek').find('.'+collClass).attr('class').search('fc-holiday') == -1 || showAtHolidays){ var width = $('.fc-content').find('.fc-view-agendaWeek') .find('.'+collClass+':last').width(); var height = 0; if(closeGap && (startRowNo != endRowNo)){ height = $('.fc-content').find('.fc-view-agendaWeek') .find('.fc-slot'+ startRowNo).height(); } $('.fc-view-agendaWeek').find('.fc-agenda-body').prepend('<div class="'+cellClass+' ' + ''+cellClass+''+startRowNo+''+collClass+'"></div>'); $('.'+cellClass).width(width - 2); height += $('.fc-content').find('.fc-view-agendaWeek') .find('.fc-slot'+ endRowNo).position().top - $('.fc-content').find('.fc-view-agendaWeek') .find('.fc-slot'+ startRowNo).position().top; $('.'+cellClass+''+startRowNo+''+collClass).height(height); $('.'+cellClass+''+startRowNo+''+collClass) .css('margin-top', $('.fc-content').find('.fc-view-agendaWeek') .find('.fc-slot'+ startRowNo).position().top); $('.'+cellClass+''+startRowNo+''+collClass) .css('margin-left', $('.fc-content').find('.fc-view-agendaWeek') .find('.'+collClass+':last').offset().left - width / 2); } } Don't forget about CSS: .fc-work-time-day{ background-color: yellow; opacity: 0.3; filter: alpha(opacity=30); /* for IE */ } .fc-work-time{ position: absolute; background-color: yellow; z-index:10; margin: 0; padding: 0; text-align: left; z-index: 0; opacity: 0.3; filter: alpha(opacity=30); /* for IE */ } So, I've got some questions about - is the other way to make the same, but no using absolute div's in agendaWeek? And... How can I get in viewDisplay function actual slotMinutes, minTime and maxTime

    Read the article

  • WPF opposite of airspace issue

    - by SwiftLion
    I have a strange one here, I know there is a issue with airspace and transparency when opening up a web browser control within a WPF application. But in my instance I do not need transparency or opacity etc but the web pages are opening up with a strange overlay across them rather then showing solid colors? I have a WPF application that has a Grid and within the Grid there is a Frame and the frame source is a normal website url which is showing strange colors, as if there is a transparency/opacity issue going on? when I view the web page in a normal browser the page displays fine?

    Read the article

  • ControlTemplate with "Control.IsMouseOver" Value="True" and "Control.IsMouseOver" Value="False">

    - by Vinjamuri
    In my WPF control, I have below code. If I don't have a trigger with false, I can see the my storyboard, but if I have both ture and false triggers, I don't see any thing. How to fix this? Appreciate your help! <Trigger Property="Control.IsMouseOver" Value="True"> <StoryBoard> Image with Opacity 1 </StoryBoard> </Trigger> <Trigger Property="Control.IsMouseOver" Value="False"> <StoryBoard> Image with Opacity 0 </StoryBoard> </Trigger>

    Read the article

  • jquery hasClass "active" on ul#navigation li on page load not working

    - by Ross
    $(document).ready(function(){ $("li").click(function(){ if ($(this).hasClass("active") ) $(this).fadeTo("slow", 1.0); }); }); I have a navigation bar made and am using this code to add a transparency effect on hover: $(document).ready(function(){ $(".thumbs").fadeTo("slow", 0.6); $(".thumbs").hover(function(){ $(this).fadeTo("slow", 1.0); },function(){ $(this).fadeTo("slow", 0.4); }); }); I'm also using hoverIntent. The opacity rollover works a treat, but I'd like my "active" page to have 100% opacity, but I can't seem to get it to work..what am I doing wrong? the link in questions HTML is: <ul id="navigation"> <li class="active"><a href="page.htm"></a></li> </ul> the nav works perfect minus my "active" class so I think I provided all the necessary code. thank you.

    Read the article

  • [Cocoa] NSImage transparency

    - by ndg
    I'm trying to set a custom drag icon for use in an NSTableView. Everything seems to work but I've run into a problem due to my inexperience with Quartz. - (NSImage *)dragImageForRowsWithIndexes:(NSIndexSet *)dragRows tableColumns:(NSArray *)tableColumns event:(NSEvent *)dragEvent offset:(NSPointPointer)dragImageOffset { NSImage *dragImage = [NSImage imageNamed:@"icon.png"]; NSString *count = [NSString stringWithFormat:@"%d", [dragRows count]]; [dragImage lockFocus]; [dragImage compositeToPoint:NSZeroPoint fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:0.5]; [count drawAtPoint:NSZeroPoint withAttributes:nil]; [dragImage unlockFocus]; return dragImage; } Essentially what I'm looking to do is render my icon.png file with 50% opacity along with an NSString which shows the number of rows currently being dragged. The issue I'm seeing is that my NSString renders with a low opacity, but not my icon.

    Read the article

  • Animate an Image after hovering an item a second

    - by mikep
    Hey, after some tries to get this to work, i ask you, if you know where my mistake is. This is my code until now: $(".menu a").hover( function () { $(this).data('timeout', setTimeout( function () { $(this).hover(function() { $(this).next("em").animate({opacity: "show", top: "-65"}, "slow"); }, function() { $(this).next("em").animate({opacity: "hide", top: "-75"}, "fast"); }); }, 1000)); }, function () { clearTimeout($(this).data('timeout')); }); i would be happy about some help.

    Read the article

  • Animate function jQuery

    - by Antonio Pitasi
    I'm new here and I have a problem the jQuery's function "animate" function myFunction(newpage) { $('#loader').animate({opacity: 0.0}, 400, 'linear', function(){ // callback of fadeOut() $(this).load(newpage + ".php #toload", function(){ // callback of load() $('#loader').animate({opacity: 100.0}, 400, 'linear', function(){ //callback of fadeIn() // (not relevant for my problem, I think) $.getScript("js/test.js"); }); }); }); } My problem is: the first "animate" works like a charm but the second load the new content correctly, without the animation (a simple fadeIn). Anyone can help me? Thanks in advice! P.S. Sorry for my english

    Read the article

  • Configuring a html page from an original demo page

    - by Wold
    I forked into rainyday.js through github, an awesome javascript program made by maroslaw at this link: https://github.com/maroslaw/rainyday.js. Basically I tried taking his demo page and my own photo city.jpg and changed the applicable fields so that I could run it on my own site, but only the picture loads and the script itself doesn't start to run. I'm pretty new to html and javascript so I'm probably omitting something very simple, but here is the script for the demo code: <script src="rainyday.js"></script> <script> function getURLParameter(name) { return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,''])[1].replace(/\+/g, '%20'))||null; } function demo() { var image = document.getElementById('background'); image.onload = function () { var engine = null; var preset = getURLParameter('preset') || '1'; if (preset === '1') { engine = new RainyDay({ element: 'background', blur: 10, opacity: 1, fps: 30, speed: 30 }); engine.rain([ [1, 2, 8000] ]); engine.rain([ [3, 3, 0.88], [5, 5, 0.9], [6, 2, 1] ], 100); } else if (preset === '2') { engine = new RainyDay({ element: 'background', blur: 10, opacity: 1, fps: 30, speed: 30 }); engine.VARIABLE_GRAVITY_ANGLE = Math.PI / 8; engine.rain([ [0, 2, 0.5], [4, 4, 1] ], 50); } else if (preset === '3') { engine = new RainyDay({ element: 'background', blur: 10, opacity: 1, fps: 30, speed: 30 }); engine.trail = engine.TRAIL_SMUDGE; engine.rain([ [0, 2, 0.5], [4, 4, 1] ], 100); } }; image.crossOrigin = 'anonymous'; if (getURLParameter('imgur')) { image.src = 'http://i.imgur.com/' + getURLParameter('imgur') + '.jpg'; } else if (getURLParameter('img')) { image.src = getURLParameter('img') + '.jpg'; } var youtube = getURLParameter('youtube'); if (youtube) { var div = document.getElementById('sound'); var player = document.createElement('iframe'); player.frameborder = '0'; player.height = '1'; player.width = '1'; player.src = 'https://youtube.com/embed/' + youtube + '?autoplay=1&controls=0&showinfo=0&autohide=1&loop=1'; div.appendChild(player); } } </script> This is where I am naming my background and specifying the photo from within the directory. <body onload="demo();"> <div id="sound" style="z-index: -1;"></div> <div id="parent"> <img id='background' alt="background" src="city.jpg" /> </div> </body> The actual code for the whole entire rainyday.js script can be found here: https://github.com/maroslaw/rainyday.js/blob/master/rainyday.js Thanks in advance for any help and advice!

    Read the article

  • CSS content overflowing containing div

    - by kaese
    Hi, Currently have a problem with some DIVs overlapping their containing DIVs. See image below (the 3 products at the bottom): All the body content of the page is held within the #content DIV: div#content { width: 960px; float: left; background-image: url("../img/contentBg.png"); background-repeat: repeat; margin-top: 10px; line-height: 1.8em; border-top: 8px solid #5E88A2; padding: 10px 15px 10px 15px; } And here is the CSS for the product boxes within the #content div: .upper { text-transform: uppercase; } .center { text-align: center; } div#products { float: left; width: 100%; margin-bottom: 25px; } div.productContainer { float: left; width: 265px; font-size: 1em; margin-left: 50px; height: 200px; padding-top: 25px; text-align: right; } div.product { float: left; width: 200px; } div.product p { } div.product a { display: block; } div.product img { float: left; } div.product img:hover { opacity: 0.8; filter: alpha(opacity = 80); } div.transparent { opacity: 0.8; filter: alpha(opacity = 80); } And here is the HTML for the boxes: <div class="productContainer"> <div class="product"> <h2 class="upper center">A2 Print</h2> <a href='../edit/?productId=5&amp;align=v' class='upper'> <img src="../../wflow/tmp/133703b808c91b8ec7e7c7cdf19320b7A2-Print.png" alt="Representation of image printed at A2 Print through MyPersonalPoster." /></a> <p class="upper">16.5 inches x 23.4 inches<br /><strong>&pound;15.99</strong></p> <p class="upper smaller"><em><span><span class="yes">Yes</span> - your picture quality is high enough for this size</span> </em></p> <p><a href='../edit/?productId=5&amp;align=v' class='upper'><span>Select</span></a></p> </div> </div> <div class="productContainer"> <div class="product transparent"> <h2 class="upper center">A1 Print</h2> <a href='../edit/?productId=11&amp;align=v' class='upper'> <img src="../../wflow/tmp/133703b808c91b8ec7e7c7cdf19320b7A1-Print.png" alt="Representation of image printed at A1 Print through MyPersonalPoster." /></a> <p class="upper">23.4 inches x 33.1 inches<br /><strong>&pound;19.99</strong></p> <p class="upper smaller"><em><span><span class="no">Warning</span> - your picture quality may not be sufficient for this size</span> </em></p> <p><a href='../edit/?productId=11&amp;align=v' class='upper'><span>Select</span></a></p> </div> </div> <div class="productContainer"> <div class="product transparent"> <h2 class="upper center">Poster Print (60cm x 80cm)</h2> <a href='../edit/?productId=12&amp;align=v' class='upper'> <img src="../../wflow/tmp/133703b808c91b8ec7e7c7cdf19320b7Poster-Print-(60cm-x-80cm).png" alt="Representation of image printed at Poster Print (60cm x 80cm) through MyPersonalPoster." /></a> <p class="upper">23.6 inches x 31.5 inches<br /><strong>&pound;13.95</strong></p> <p class="upper smaller"><em><span><span class="no">Warning</span> - your picture quality may not be sufficient for this size</span> </em></p> <p><a href='../edit/?productId=12&amp;align=v' class='upper'><span>Select</span></a></p> </div> </div> Any idea what could be causing these DIVs to overlap? What I'd like is for all the boxes to fit within the #container div as expected. It's driving me crazy! Cheers

    Read the article

  • how can I get jquery.sIFR plugin to display sIFR-alternate text for print?

    - by apeBoy
    I'm struggling with this. I've used the jquery sIFR plugin as opposed to sIFR it prevented conflicts with other jquery I am using on my pages. It works fine in its prime function: replacing html text with Flash. However, the .sIFR-alternate class is given an inline style of 'opacity: 0' which persists when flashblock is on. So alternate text does not appear. Neither does it appear when printng the page (yes I have included styles for sIFR-print). I've tried replacing the opacity:0 inline style with display: none but this causes height issues with the output flash. Any one else had this or have any ideas?

    Read the article

  • Different Rendering of SimpleModal on IE7 and Chrome

    - by Silver Gun
    Hey Guys I tried out Simple Modal for my modal dialog needs. The jQuery $(function() { $('#showDialog').click(function() { $('<div><p> Click Here! </p></div>').modal({ overlayClose: true, opacity: 30 }) }); }); The CSS was as follows: #simplemodal-overlay { background-color: #000; } #simplemodal-container { background-color: #333; border: 8px solid #444; padding: 12px; } In IE6 and 7, it displays a nice, very transparent, gray overlay with a dark small box in the middle with the text 'Click Here!'. But in CHROME (4.0.249.43) I get a dark black overlay with 100% opacity. Any ideas? Thanks in advance

    Read the article

  • WPF problem modify style of images in multiple Button Templates

    - by user556415
    I'm trying to create a control panel for a video camera, the panel has buttons for up, down, left and right etc. Each camera function up, down, left and right is represented by three images (see code below) for the left side, middle and right side. The control panel is circular so the corner images kind of overlap (its complicated to explain this without a visual). When I click on up for example I have to hide the initial three images (leftside, middle and right side) and display another three images for left , middle and right that indicate that the button is pressed. I am achieving this by having a grid inside a button template. The problem I have is that for the corner images for the control there are really four images that represent this. For example for the top left corner the four images would be represent 1. Top not clicked. 2. Top Clicked and 3. Left Not clicked and 4. Left Clicked. My problem is if I need to make the images contained within the Top button have precedence when the top control is clicked or the images in the left button have precedence when the left button is clicked. So it's like I want to modify the left button's image visible property when the top button is clicked and vise versa. This is really difficult to explain so I apologize if it makes little sense but I can email the source code on request if anyone is interested in my predicament. <Grid> <Canvas> <!--<StackPanel>--> <Button Name="TopSide" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" Height="34" Width="102" Canvas.Left="97" Canvas.Top="60" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" > <Button.Template> <ControlTemplate TargetType="{x:Type Button}"> <Grid Width="100"> <Canvas> <Image Name="TopRightNormal" Source="Resources/topright_off.jpg" Height="34" Width="34" Canvas.Left="66"></Image> <Image Name="TopRightDown" Source="Resources/topright_down.jpg" Height="34" Width="34" Canvas.Left="66" Visibility="Hidden" ></Image> <Image Name="TopNormal" Source="Resources/topcenter_off.jpg" Height="34" Width="34" Canvas.Left="34" /> <Image Name="TopPressed" Source="Resources/topcenter_down.jpg" Height="34" Width="34" Canvas.Left="34" Visibility="Hidden" /> <Image Name="TopDisabled" Source="Resources/topcenter_off.jpg" Height="34" Width="34" Canvas.Left="34" Visibility="Hidden" /> <Image Name="TopLeftNormal" Source="Resources/topleft_off.jpg" Height="34" Width="34" Canvas.Left="2" ></Image> <Image Name="TopLeftDown" Opacity="0" Source="Resources/topleft_down.jpg" Height="34" Width="34" Canvas.Left="2" Visibility="Hidden" ></Image> </Canvas> </Grid> <ControlTemplate.Triggers> <Trigger Property="IsPressed" Value="True"> <Setter TargetName="TopNormal" Property="Visibility" Value="Hidden" /> <Setter TargetName="TopPressed" Property="Visibility" Value="Visible" /> <Setter TargetName="TopRightNormal" Property="Visibility" Value="Hidden" /> <Setter TargetName="TopRightDown" Property="Visibility" Value="Visible" /> <Setter TargetName="TopLeftNormal" Property="Visibility" Value="Hidden" /> <Setter TargetName="TopLeftDown" Property="Visibility" Value="Visible" /> <Setter TargetName="TopLeftDown" Property="Opacity" Value="100" /> </Trigger> <Trigger Property="IsEnabled" Value="False"> <Setter TargetName="TopNormal" Property="Visibility" Value="Hidden" /> <Setter TargetName="TopDisabled" Property="Visibility" Value="Visible" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Button.Template> </Button> <!--</StackPanel>--> <!--<StackPanel>--> <Button Name="LeftSide" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" Canvas.Left="100" Canvas.Top="60" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" MouseDown="Button_MouseDown_1"> <Button.Template> <ControlTemplate TargetType="{x:Type Button}"> <Grid Width="34" Height="100"> <Canvas> <Image Name="TopLeftNormal" Source="Resources/topleft_off.jpg" Height="34" Width="34" Canvas.Left="0"></Image> <Image Name="TopLeftDown" Opacity="0" Source="Resources/topleft_leftdown.jpg" Height="34" Width="34" Canvas.Left="0" Visibility="Hidden" ></Image> <Image Name="Normal" Source="Resources/leftcenter_off.jpg" Height="34" Width="34" Canvas.Top="32" Canvas.Left="0"/> <Image Name="Pressed" Source="Resources/leftcenter_down.jpg" Visibility="Hidden" Canvas.Top="32" Height="34" Width="34" /> <Image Name="Disabled" Source="Resources/leftcenter_off.jpg" Visibility="Hidden" Height="34" Width="34" Canvas.Top="32" /> </Canvas> </Grid> <ControlTemplate.Triggers> <Trigger Property="IsPressed" Value="True"> <Setter TargetName="Normal" Property="Visibility" Value="Hidden" /> <Setter TargetName="Pressed" Property="Visibility" Value="Visible" /> <Setter TargetName="TopLeftNormal" Property="Visibility" Value="Hidden" /> <Setter TargetName="TopLeftNormal" Property="Opacity" Value="0" /> <Setter TargetName="TopLeftDown" Property="Visibility" Value="Visible" /> <Setter TargetName="TopLeftDown" Property="Opacity" Value="100" /> </Trigger> <Trigger Property="IsEnabled" Value="False"> <Setter TargetName="Normal" Property="Visibility" Value="Hidden" /> <Setter TargetName="Disabled" Property="Visibility" Value="Visible" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Button.Template> </Button> <!--</StackPanel>--> <!--<StackPanel>--> <Button xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" Height="34" Width="34" Canvas.Left="165" Canvas.Top="92" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" MouseDown="Button_MouseDown_2" > <Button.Template> <ControlTemplate TargetType="{x:Type Button}"> <Grid> <Image Name="Normal" Source="Resources/rightcenter_off.jpg" /> <Image Name="Pressed" Source="Resources/rightcenter_down.jpg" Visibility="Hidden" /> <Image Name="Disabled" Source="Resources/rightcenter_off.jpg" Visibility="Hidden" /> </Grid> <ControlTemplate.Triggers> <Trigger Property="IsPressed" Value="True"> <Setter TargetName="Normal" Property="Visibility" Value="Hidden" /> <Setter TargetName="Pressed" Property="Visibility" Value="Visible" /> </Trigger> <Trigger Property="IsEnabled" Value="False"> <Setter TargetName="Normal" Property="Visibility" Value="Hidden" /> <Setter TargetName="Disabled" Property="Visibility" Value="Visible" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Button.Template> </Button> <!--</StackPanel>--> <!--<StackPanel>--> <Button xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" Height="34" Width="34" Canvas.Left="133" Canvas.Top="124" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" > <Button.Template> <ControlTemplate TargetType="{x:Type Button}"> <Grid> <Image Name="BottomNormal" Source="Resources/bottomcenter_off.jpg" /> <Image Name="BottomPressed" Source="Resources/bottomcenter_down.jpg" Visibility="Hidden" /> <Image Name="BottomDisabled" Source="Resources/bottomcenter_off.jpg" Visibility="Hidden" /> </Grid> <ControlTemplate.Triggers> <Trigger Property="IsPressed" Value="True"> <Setter TargetName="BottomNormal" Property="Visibility" Value="Hidden" /> <Setter TargetName="BottomPressed" Property="Visibility" Value="Visible" /> </Trigger> <Trigger Property="IsEnabled" Value="False"> <Setter TargetName="BottomNormal" Property="Visibility" Value="Hidden" /> <Setter TargetName="BottomDisabled" Property="Visibility" Value="Visible" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Button.Template> </Button> <!--</StackPanel>--> <Image Source="Resources/bottomright_off.jpg" Height="34" Width="34" Canvas.Left="165" Canvas.Top="124"></Image> <Image Source="Resources/bottomleft_off.jpg" Height="34" Width="34" Canvas.Left="100" Canvas.Top="124"></Image> <!--<ToggleButton Style="{StaticResource MyToggleButtonStyle}" Height="34" Width="34" Margin="150,100"/>--> </Canvas> </Grid>

    Read the article

  • GWT Clipped image

    - by Kasturi
    I am creating a widget in which a portion of an image will be highlighted and the remaining portion will have an opacity 0.5. For this i am using two images. The full image at the back with opacity 0.5. the portion of the image i want to be highlighted in the front. the front image is GWT's Clipped image. I have a scenario where i have to resize the back image. Is there any way to resize the clipped image at the front?

    Read the article

  • multiple jquery galleries

    - by user1644650
    I'm trying to separate two jQuery galleries, so they don't interlink on my html page: http://mashanova.com/myFAQ/faqGallery.html# here is the html: here is javascript: $(document).ready(function(){ $('.gallery_thumbnails a').click(function(e){ e.preventDefault(); $('.gallery_thumbnails a').removeClass('selected'); $('.gallery_thumbnails a').children().css('opacity','1'); $(this).addClass('selected'); $(this).children().css('opacity','.4'); var photo_fullsize = $(this).attr('href'); var photo_preveiw = photo_fullsize.replace('fullsize','preview'); $('.gallery_preview').html('<a href="'+photo_fullsize+'" style="background-image:url('+photo_preveiw+');"></a>'); }); });

    Read the article

  • Dropdown menu getting hidden by images

    - by Bob
    I have a set of dropdown menus across the top of a web page. Below is text and some images. When I hover over the top of each menu the menu then expands below as expected but while it overlaps any text on the page it is hidden behind any images. I set the z-index to 9999 and the position is set to absolute. I found if I lower the opacity of the images to say 0.6 then the menu will overlap it. So one solution would be to detect when the menu is being hovered over and then in JavaScript or JQuery temporarily reduce the opacity of the rest of the page until the cursor moves off the menu. If so I'm not sure how to do that but is that the best approach?

    Read the article

  • Simplify your Ajax code by using jQuery Global Ajax Handlers and ajaxSetup low-level interface

    - by hajan
    Creating web applications with consistent layout and user interface is very important for your users. In several ASP.NET projects I’ve completed lately, I’ve been using a lot jQuery and jQuery Ajax to achieve rich user experience and seamless interaction between the client and the server. In almost all of them, I took advantage of the nice jQuery global ajax handlers and jQuery ajax functions. Let’s say you build web application which mainly interacts using Ajax post and get to accomplish various operations. As you may already know, you can easily perform Ajax operations using jQuery Ajax low-level method or jQuery $.get, $.post, etc. Simple get example: $.get("/Home/GetData", function (d) { alert(d); }); As you can see, this is the simplest possible way to make Ajax call. What it does in behind is constructing low-level Ajax call by specifying all necessary information for the request, filling with default information set for the required properties such as data type, content type, etc... If you want to have some more control over what is happening with your Ajax Request, you can easily take advantage of the global ajax handlers. In order to register global ajax handlers, jQuery API provides you set of global Ajax methods. You can find all the methods in the following link http://api.jquery.com/category/ajax/global-ajax-event-handlers/, and these are: ajaxComplete ajaxError ajaxSend ajaxStart ajaxStop ajaxSuccess And the low-level ajax interfaces http://api.jquery.com/category/ajax/low-level-interface/: ajax ajaxPrefilter ajaxSetup For global settings, I usually use ajaxSetup combining it with the ajax event handlers. $.ajaxSetup is very good to help you set default values that you will use in all of your future Ajax Requests, so that you won’t need to repeat the same properties all the time unless you want to override the default settings. Mainly, I am using global ajaxSetup function similarly to the following way: $.ajaxSetup({ cache: false, error: function (x, e) { if (x.status == 550) alert("550 Error Message"); else if (x.status == "403") alert("403. Not Authorized"); else if (x.status == "500") alert("500. Internal Server Error"); else alert("Error..."); }, success: function (x) { //do something global on success... } }); .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } Now, you can make ajax call using low-level $.ajax interface and you don’t need to worry about specifying any of the properties we’ve set in the $.ajaxSetup function. So, you can create your own ways to handle various situations when your Ajax requests are occurring. Sometimes, some of your Ajax Requests may take much longer than expected… So, in order to make user friendly UI that will show some progress bar or animated image that something is happening in behind, you can combine ajaxStart and ajaxStop methods to do the same. First of all, add one <div id=”loading” style=”display:none;”> <img src="@Url.Content("~/Content/images/ajax-loader.gif")" alt="Ajax Loader" /></div> anywhere on your Master Layout / Master page (you can download nice ajax loading images from http://ajaxload.info/). Then, add the following two handlers: $(document).ajaxStart(function () { $("#loading").attr("style", "position:absolute; z-index: 1000; top: 0px; "+ "left:0px; text-align: center; display:none; background-color: #ddd; "+ "height: 100%; width: 100%; /* These three lines are for transparency "+ "in all browsers. */-ms-filter:\"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)\";"+ " filter: alpha(opacity=50); opacity:.5;"); $("#loading img").attr("style", "position:relative; top:40%; z-index:5;"); $("#loading").show(); }); $(document).ajaxStop(function () { $("#loading").removeAttr("style"); $("#loading img").removeAttr("style"); $("#loading").hide(); }); .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } Note: While you can reorganize the style in a more reusable way, since these are global Ajax Start/Stop, it is very possible that you won’t use the same style in other places. With this way, you will see that now for any ajax request in your web site or application, you will have the loading image appearing providing better user experience. What I’ve shown is several useful examples on how to simplify your Ajax code by using Global Ajax Handlers and the low-level AjaxSetup function. Of course, you can do a lot more with the other methods as well. Hope this was helpful. Regards, Hajan

    Read the article

  • Silverlight Cream for March 10, 2010 - 2 -- #811

    - by Dave Campbell
    In this Issue: AfricanGeek, Phil Middlemiss, Damon Payne, David Anson, Jesse Liberty, Jeremy Likness, Jobi Joy(-2-), Fredrik Normén, Bobby Diaz, and Mike Taulty(-2-). Shoutouts: Shawn Wildermuth blogged that they posted My "What's New in Silverlight 3" Video from 0reDev Last Fall Shawn Wildermuth also has a post up for his loyal followers: Where to See Me At MIX10 Jonas Follesø has presentation materials up as well: MVVM presentation from NDC2009 on Vimeo Adam Kinney updated his Favorite Tool and Library Downloads for Silverlight From SilverlightCream.com: Styling Silverlight ListBox with Blend 3 In his latest Video Tutorial, AfricanGeek is animating the ListBox control by way of Expression Blend 3. Animating the Silverlight Opacity Mask Phil Middlemiss has written a Behavior that lets you turn a FrameworkElement into an opacity mask for it's parent container... check out his tutorial and grab the code. AddRange for ObservableCollection in Silverlight 3 Damon Payne has a post up discussing the problem with large amounts of data in an ObservableCollection, and how using AddRange is a performance booster. Easily rotate the axis labels of a Silverlight/WPF Toolkit chart David Anson blogged a solution to rotating the axis labels of a Silverlight and WPF chart. Persisting the Configuration (Updated) Jesse Liberty has a good discussion on the continuation of his HyperVideo Platform talking about what all he is needing from the database in the form of configuration information... including the relationships. Animations and View Models: IAnimationDelegate Check out Jeremy Likness' IAnimationDelegate that lets your ViewModel fire and respond to animations without having to know all about them. Button Style - Silverlight Jobi Joy converted a WPF control template into Silverlight... and you'll want to download the XAML he's got for this :) A Simple Accordion banner using ListBox Jobi Joy also has an Image Accordian created in Expression Blend... and it's a 'drop this XAML in your User Control' kinda thing... again, go grab the XAML :) WCF RIA Services Silverlight Business Application – Using ASP.NET SiteMap for Navigation Fredrik Normén has a code-laden post up on RIA Services and the ASP.NET SiteMap. He is using the Silverlight Business app template that comes with WCF RIA Services. A Simple, Selectable Silverlight TextBlock (sort of)... Bobby Diaz shares with us his solution for a Text control that can be copied from in the same manner 'normal' web controls can be. He also includes a link to another post on the same topic. Silverlight 4 Beta Networking. Part 11 - WCF and TCP Mike Taulty has another pair of video tutorials up in his Networking series. This one is on WCF over TCP Silverlight 4 Beta Networking. Part 12 - WCF and Polling HTTP Mike Taulty's 12th networking video tutorial is on WCF with HTTP polling duplex. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    MIX10

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >