Search Results

Search found 2130 results on 86 pages for 'swap'.

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

  • Jquery fade and swap an element when clicked which will also relate to an accordian menu

    - by Nik
    You will notice when you click posture 1 the description drops down and images appear on the right. Now when you click posture 2 or posture 3 the images and description change as they should. What I need to do now is - If posture 1 has been clicked and then posture 2 is clicked the posture 1 menu needs to close so that there is only one posture description visible at one time. If I could also make it so that if the current open posture item is clicked so that it closes and there are no open posture descriptions that there also no images displayed on the right. Finally is there a way to make sure only one set of animation images is running, because just say the user goes through all 26 options and they continue to run in the background it may get sluggish (thanks to Nick Craver for bringing that up). At this stage only posture 1, 2 and 3 are available. Ok finally some code - //Description drop-down boxes $(document).ready(function(){ //Hide (Collapse) the toggle containers on load $(".toggle_container").hide(); //Switch the "Open" and "Close" state per click $("h5.trigger").toggle(function(){ $(this).addClass("active"); }, function () { $(this).removeClass("active"); }); //Slide up and down on click $("h5.trigger").click(function(){ $(this).next(".toggle_container").slideToggle("slow"); }); }); //Images on the right fade in and out thanks to aSeptik $(document).ready(function(){ $('#section_Q_01,#section_Q_02,#section_Q_03').hide(); $(function() { $('h5.trigger a').click( function(e) { e.preventDefault(); var trigger_id = $(this).parent().attr('id'); //get id Q_## $('.current').removeClass('current').hide(); //add a class for easy access & hide $('#section_' + trigger_id).addClass('current').fadeIn(5000); //show clicked one }); }); }); //Fading pics $(document).ready(function(){ $('.pics').cycle({ fx: 'fade', speed: 2500 }); }); Description boxes - <h5 class="trigger" id="Q_01" ><a href="#">Posture 1 : Standing Deep Breathing :</a></h5> <div class="toggle_container" > <div class="block"> <span class="sc">Pranayama Series</span> <p class="bold">Benefits:</p> </div> </div> <h5 class="trigger" id="Q_02" ><a href="#">Posture 2 : Half Moon Pose With Hands To Feet Pose :</a></h5> <div class="toggle_container"> <div class="block"> <span class="sc">Ardha Chandrasana with Pada-Hastasana</span> <p class="bold">Benefits:</p> </div> </div> <h5 class="trigger" id="Q_03" ><a href="#">Posture 3 : Awkward Pose :</a></h5> <div class="toggle_container"> <div class="block"> <span class="sc">Utkatasana</span> <p class="bold">Benefits:</p> </div> </div> and the images on the right - <div id="section_Q_01" class="01"> <div class="pics"> <img src="../images/multi/poses/pose1/Pranayama._01.jpg"/> <img src="../images/multi/poses/pose1/Pranayama._02.jpg"/> <img src="../images/multi/poses/pose1/Pranayama._03.jpg"/> </div> </div> <div id="section_Q_02" class="02"> <div class="pics"> <img src="../images/multi/poses/pose2/Half_Moon_Pose_04.jpg" /> <img src="../images/multi/poses/pose2/Backward_Bending_05.jpg" /> <img src="../images/multi/poses/pose2/Hands_to_Feet_Pose_06.jpg" /> </div> </div> <div id="section_Q_03" class="03"> <div class="pics"> <img src="../images/multi/poses/pose3/Awkward_01.jpg" /> <img src="../images/multi/poses/pose3/Awkward_02.jpg" /> <img src="../images/multi/poses/pose3/Awkward_03.jpg" /> </div> </div> It would be a bonus if images faded out when another element is clicked... but not a big deal. Thanks for having a look

    Read the article

  • Swap references at build time in VS

    - by NitroxDM
    I have a project that runs on both .NET and .NET CF. But it uses a 3rd party library that will not run on both. So I end up changing the reference every time the project gets built. Project A - References the 3rd party dll. Project B - References A and runs .NET CF Project C - References A and runs .NET Is there a way to automate it?

    Read the article

  • Swap CSS class on the basis of Scroll Position with Javascript

    - by Alan
    I have followed answer given by CMS in relation to getting a menu to stay in one place on the page whilst you scroll the page as per this original question and it works very well but I also have a number of images on the page where I'm using the jquery fancylink plugin to show an enlarged image on click. The problem is when you then close the fancylink popup and scroll to the top of the page the static DIV then decides to stick to the very top of the page. Any ideas or help would this would be greatly appreciated.

    Read the article

  • Is it possible to swap lines of xml code in soap

    - by John
    I wish to send a request like <v:Envelope xmlns:i="xxx"> <v:Header /> <v:Body> <sendTwoWaySmsMessage xmlns="xxx" id="o0" c:root="1"> <connectionId i:type="d:string">connectionId</connectionId> <twoWaySmsMessage> <message i:type="d:string">love it. It seems to work</message> <mobiles i:type="d:string">345</mobiles> <messageId i:type="d:string">123</messageId> </twoWaySmsMessage> </sendTwoWaySmsMessage> </v:Body> </v:Envelope> what i get is <v:Envelope xmlns:i="xxx"> <v:Header /> <v:Body> <sendTwoWaySmsMessage xmlns="xxx" id="o0" c:root="1"> <twoWaySmsMessage> <message i:type="d:string">love it. It seems to work</message> <mobiles i:type="d:string">345</mobiles> <messageId i:type="d:string">123</messageId> </twoWaySmsMessage> <connectionId i:type="d:string">connectionId</connectionId> </sendTwoWaySmsMessage> </v:Body> </v:Envelope> code is SoapObject request = new SoapObject(WSDL_TARGET_NAMESPACE, url); SoapObject message = new SoapObject("", "twoWaySmsMessage"); request.addProperty("connectionId", did); message.addProperty("message", "love it. It seems to work"); message.addProperty("mobiles", "435"); message.addProperty("messageId", "123"); request.addSoapObject(message); request.setProperty(0, "connectionId"); when i use SoapUI with the second with the "connectionId" swaped it seem to work can anyone help. of have ideas. I have looked at just about every ksoap question out there and cant seem to find an answer?

    Read the article

  • swap a div to an embed form when user tweets using the @anywhere function box

    - by Jeff
    I'm using the @anywhere twitter function on the front page of my site (vocabbomb.com) and right now it works great to allow users to tweet straight away. Problem is, when they click tweet, it just reloads the twitter box, empty. I want it to load something new, like a "thank you, now fill in this email form" and show a mailchimp form. Ok so this is the @anywhere code currently working fine: <div id="tbox"></div> <script type="text/javascript"> twttr.anywhere(function (T) { T("#tbox").tweetBox({ height: 100, width: 400, defaultContent: " #vocabbomb", label: "Use the word foo in a tweet:", }); }); </script> So this is fine, and when the user writes a tweet, it just re-displays the twitter box. I understand there is a function that lets you specify stuff after the tweet is made: (example from http://dev.twitter.com/pages/anywhere_tweetbox) <div id="example-ontweet"></div> <script type="text/javascript"> twttr.anywhere(function (T) { T("#example-ontweet").tweetBox({ onTweet : function(plaintext, html) { console.log(plaintext); alert(html); } }); }); </script> Is this the best way to attempt this? Or do I need a function or something that changes what's in the div to something else? I want the mailchimp email form to show up after the tweet. It includes a ton of script and tags and starts like this: <!-- Begin MailChimp Signup Form --> <!--[if IE]> <style type="text/css" media="screen"> #mc_embed_signup fieldset {position: relative;} #mc_embed_signup legend {position: absolute; top: -1em; left: .2em;} </style> <![endif]--> <!--[if IE 7]> <style type="text/css" media="screen"> .mc-field-group {overflow:visible;} </style> <![endif]--> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script> <script type="text/javascript" src="http://downloads.mailchimp.com/js/jquery.validate.js"></script> <script type="text/javascript" src="http://downloads.mailchimp.com/js/jquery.form.js"></script> <div id="mc_embed_signup"> <form action="http://faresharenyc.us1.list-manage.com/subscribe/post?u=106b58b4751a007d826715754&amp;id=2fe6ba4e6a" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" style="font: normal 100% Arial, sans-serif;font-size: 10px;"> ... So my attempt to just require it inside the function didn't work at all: <div id="tbox"></div> <script type="text/javascript"> twttr.anywhere(function (T) { T("#tbox").tweetBox({ height: 100, width: 400, defaultContent: " #vocabbomb", label: "Use the word foo in a tweet:", onTweet: function(plain, html){ <?php require_once('mailchimp.html'); ?> } }); }); </script> Nettuts had a brief discussion here: http://net.tutsplus.com/tutorials/javascript-ajax/using-twitters-anywhere-service-in-6-steps/ I am seeing now that the 'onTweet' function simply adds some text above the twitter box, but doesn't actually replace the entire twitter box. How do I do that? Is it possible? Thanks!

    Read the article

  • swap jquery backgroundColor for background image?

    - by Joel
    A friend gave me a solution that uses this jquery code: .css({ backgroundColor: '#ddd' }) Instead, i'd like to use a background image. How do I change the jquery code to do that? I'm wanting to do something like .css({ backgroundImg: 'images/newsletter-dropdown.jpg' }) Thanks!

    Read the article

  • jQuery Swap Image on Click and if/else

    - by jrutter
    Im stuck, Im setting a variable when someone clicks, then testing with if to see if the variable exists and doing something else. Its a simple script which Im probably overthinking, would love someone's thoughts. $('.view-alternatives-btn').live('click', function() { //$("#nc-alternate-wines").scrollTo(); //$('.nc-remove').toggle(); var showBtn = null; if (showBtn == null) { $('.view-alternatives-btn img').attr("src","../images/wsj_hide_alternatives_btn.gif"); $('#nc-alternate-wines').show(); showBtn = 1; console.log(showBtn); } else if (showBtn == 1) { $('.view-alternatives-btn img').attr("src","../images/wsj_view_alternatives_btn.gif"); $('#nc-alternate-wines').hide(); console.log("this " + showBtn); } return false; });

    Read the article

  • jquery image swap works in one html file but not another

    - by Jon
    I have two header templates for my site. One for the blog section and one for everything else. The below code swaps an image in my nav menu, on hover. It works for one template but not the other. The html code is pretty much identical in both header templates. Please help me!! $(document).ready(function(){ $('.nav-home, .nav-port, .nav-exp, .nav-cont, .nav-blog').hover(function(){ $(this).attr('src','/images/' + $(this).attr('class') + '-hover.gif'); }, function(){ $(this).attr('src','/images/' + $(this).attr('class') + '.gif'); }); });

    Read the article

  • How do I swap triangle icons when doing expanding/collapsing divs with Javascript/CSS

    - by SL
    I have a div that I want to toggle between displaying or not when a user clicks on a piece of text. I have a javascript function that toggles a div on or off. That works fine. What I don't know how to do is to have a triangle that points to the right or down depending on whether the div is open. My HTML looks like this: <a onclick="toggleDiv('myDiv');">Click here to expand or close div</a> <div id="myDiv" style="display:none"> ... </div> How do I add one of those triangles and have it point the right way, ideally with just HTML, Javascript, and CSS? The triangle would appear to the left of the "Click here..." string. Thanks.

    Read the article

  • jQuery .click() .toggle() - change display and swap character

    - by danit
    Here is my jQuery: $('.ask').click(function() { $('.addtitle').slideToggle('fast', function() { // Animation complete. }); }); And my HTML: <p class="ask">+</p> <div class="addtitle"> <p>Give your Idea a great title</p> <form name="input" action="#" method="get"> <input id="title" type="text" name="title" /> <input id="go" type="submit" value="Go" /> </form> </div> I have multiple .ask div's on the page and I only want it to effect the .next() div named .ask rather than all div's named .ask. I also want to .toggle() the '+' character to '-' Can anyone assist?

    Read the article

  • Java Concurrency: CAS vs Locking

    - by Hugo Walker
    Im currently reading the Book Java Concurrency in Practice. In the Chapter 15 they are speaking about the Nonblocking algorithms and the compare-and-swap (CAS) Method. It is written that the CAS perform much better than the Locking Methods. I want to ask the people which already worked with both of this concepts and would like to hear when you are preferring which of these concept? Is it really so much faster? Personally for me the usage of Locks is much clearer and easier to understand and maybe even better to maintain. (Please correct me if I am wrong). Should we really focus creating our concurrent code related on CAS than Locks to get a better performance boost or is sustainability a higher thing? I know there is maybe not a strict rule, when to use what. But I just would like to hear some opinions, experiences with the new concept of CAS.

    Read the article

  • How large should I make root, home, and swap partitions?

    - by starcorn
    Hello, I have a laptop with win7 installed. I have now made a 60gb partition which I want to install ubuntu into. The question I have, before I do the installation, is how large each of the root, swap, and home partition should be? I have read some place that root could be as small as 8GB, but isn't that too small? Since I guess beside ubuntu all the softwares installed will reside there as well? And I think I'm going to set my swap to be 2GB large. My main concern is how large should the root partition should be. I'm mainly going to use ubuntu for programming and browse the web.

    Read the article

  • Want to back up using dd, but my present ubuntu installation is 149.04 + 3.81(swap) GB, my target drive is only 149.05 GB

    - by Shreshth
    My netbook is a Windows7-Ubuntu 12.04 dual boot. in gparted the strcture looks like Partition filesystem size /dev/sda2 extended 152.86GiB __/dev/sda6 ext4 149.04GiB __/dev/sda5 linux-swap 3.81GiB /dev/sda3 ntfs 100MiB /dev/sda4 ntfs 145.13GiB /dev/sdb1 fat32 149.05GiB I want to backup my ubuntu 12.04 installation that is sda2 (sda6 + sda5) to sdb1. As you can see sda5 +sda6 is 152.86 GB where are sdb1 is only 149.05 GB. Can I backup only sda6(149.04GB) without losing any data? That is to say, will I be able to restore my ubuntu using only sda6 and later add the needed swap? Edit: Made it readable.

    Read the article

  • gcc compiling error on Solaris 10

    - by osman toker
    I want to compile a source code, but there are some compiling errors about __sync_xxx functions (__sync_bool_compare_and_swap etc.) GCC version on machine is 3.4.3 (it must be gcc 4.1 or over for supporting atomic builtins), so I have downloaded GCC v4.6, copied it to another directory (I didn't remove v3.4.3) then change the $PATH path for GCC but it doesn't work (the same error occurs). I want to ask that is only changing gcc path with export PATH=... enough for compiling with new GCC?

    Read the article

  • 'Bank Switching' Sprites on old NES applications

    - by Jeffrey Kern
    I'm currently writing in C# what could basically be called my own interpretation of the NES hardware for an old-school looking game that I'm developing. I've fired up FCE and have been observing how the NES displayed and rendered graphics. In a nutshell, the NES could hold two bitmaps worth of graphical information, each with the dimensions of 128x128. These are called the PPU tables. One was for BG tiles and the other was for sprites. The data had to be in this memory for it to be drawn on-screen. Now, if a game had more graphical data then these two banks, it could write portions of this new information to these banks -overwriting what was there - at the end of each frame, and use it from the next frame onward. So, in old games how did the programmers 'bank switch'? I mean, within the level design, how did they know which graphic set to load? I've noticed that Mega Man 2 bankswitches when the screen programatically scrolls from one portion of the stage to the next. But how did they store this information in the level - what sprites to copy over into the PPU tables, and where to write them at? Another example would be hitting pause in MM2. BG tiles get over-written during pause, and then get restored when the player unpauses. How did they remember which tiles they replaced and how to restore them? If I was lazy, I could just make one huge static bitmap and just grab values that way. But I'm forcing myself to limit these values to create a more authentic experience. I've read the amazing guide on how M.C. Kids was made, and I'm trying to be barebones about how I program this game. It still just boggles my mind how these programmers accomplisehd what they did with what they had. EDIT: The only solution I can think of would be to hold separate tables that state what tiles should be in the PPU at what time, but I think that would be a huge memory resource that the NES wouldn't be able to handle.

    Read the article

  • Why the output is not same ??

    - by javatechi
    public class swapex{ public static int var1, var2; public void badSwap(int var1, int var2){ int temp = var1; this.var1 = var2; this.var2 = temp; System.out.println("var1 " + var1 + " var2 "+ var2); } public static void main(String args[]) { swapex sw= new swapex(); sw.badSwap(10,20); System.out.println("var1 " + var1 + " var2 "+ var2); } }

    Read the article

  • best algorithm for swapping?

    - by ashish yadav
    i have heard from a friend of mine that the best algorithm for swapping is " (a^=b^=a^=b)" where a and b are two integers to be swapped. but when i applied this using c language it resulted in crashing. can anyone of you fine people explain the possible reason for that? please suggest the best algorithm for swapping. thank you!!!!

    Read the article

  • Azure Deployment - Be careful adding a Remote Desktop connection to deployments that you want to swap staging with live…

    - by joelvarty
    Adding Remote Desktop capability adds an external endpoint onto the deployment, meaning it may have more endpoints that your current live deployment.  When there is a difference in the number of endpoints between a staging and live deployment, you can’t swap them in the Azure portal.  Oops. So you have to the remote capability to your live deployment first if you want to do this… more later – joel

    Read the article

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