Search Results

Search found 3309 results on 133 pages for 'relative positioning'.

Page 113/133 | < Previous Page | 109 110 111 112 113 114 115 116 117 118 119 120  | Next Page >

  • How to drag only one image with SDK Iphone

    - by loka
    Hi! I want to create a little app that takes two images and i want to make only the image over draggable. After research, i found this solution : -(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [[ event allTouches] anyObject]; image.alpha = 0.7; if([touch view] == image){ CGPoint location = [touch locationInView:self.view]; image.center = location; } It works but the problem is that the image is draggable from its center and i don't want that. So i found another solution : - (void) touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event { // Retrieve the touch point CGPoint pt = [[touches anyObject] locationInView:self.view]; startLocation = pt; [[self view] bringSubviewToFront:self.view]; } - (void) touchesMoved:(NSSet*)touches withEvent:(UIEvent*)event { // Move relative to the original touch point CGPoint pt = [[touches anyObject] locationInView:self.view]; frame = [self.view frame]; frame.origin.x += pt.x - startLocation.x; frame.origin.y += pt.y - startLocation.y; [self.view setFrame:frame]; } It works very well but when i add another image, all the images of the view are draggable at the same time.I'm a beginner with the iphone programmation and i have no idea of how i can only make the image over draggable. Thank you in advance for your help!!

    Read the article

  • C++ traits question

    - by duli
    I have a templated class template <typename Data> class C { ..... } In most situations, I depend on the compiler to let me substitute types for Data. I call methods foo(), goo() on objects of type Data, so what I substitute needs to provide that. I now need to substitute int and string for my Data type. I do not want to specialize because the class is already too big and would require specializing each method (with only small code change). My options (please tell me if there are more) 1) I can provide wrapper classes around int and string which implement the methods foo(), goo() etc 2) provide a traits class traits that calls foo() or goo() on objects of classes that provide foo(),goo() (these are my present substitutable classes) and specialize these classes for int and string. Questions 1) what are the relative merits of 1 vs 2? 2) My traits classes will have static methods. Can a traits class have non-static methods as well? I see most traits classes define constants in the STL. 3) Do I make the traits classes global or should I pass them in as a template parameter for class C?

    Read the article

  • Margin-Top push outer div down

    - by Daniel Hertz
    Hello, I have a header div as the first element in my wrapper div, but when I add a top margin to a h1 inside the header div it pushes the entire header div down. I realize this happens whenever I apply a top margin to the first visible element on a page. Here is a sample of the css. Thanks! div#header{ width: 100%; background-color: #000; position: relative; } div#header h1{ text-align: center; width: 375px; height: 50px; margin: 0 auto; font-size: 220%; text-indent: -5000px; background: url('../../images/name_logo.png') no-repeat; } html part <div id="header"> <h1><a href="/home.php">Title</a></h1> <ul id="navbar">

    Read the article

  • How do you get the solution directory in C# (VS 2008) in code?

    - by IsaacB
    Hi, Got an annoying problem here. I've got an NHibernate/Forms application I'm working through SVN. I made some of my own controls, but when I drag and drop those (or view some form editors where I have already dragged and dropped) onto some of my other controls, Visual studio decides it needs to execute some of the code I wrote, including the part that looks for hibernate.cfg.xml. I have no idea why this is, but (sometimes!) when it executes the code during my form load or drag and drop it switches the current directory to C:\program files\vs 9.0\common7\ide, and then nhibernate throws an exception that it can't find hibernate.cfg.xml, because I'm searching for that in a relative path. Now, I don't want to hard code the location of hibernate.cfg.xml, or just copy hibernate.cfg.xml to the ide directory (which will work). I want a solution that gets the solutions directory while the current directory is common7\ide. Something that will let someone view my forms in the designer on a fresh checkout to an arbitrary directory on an arbitrary machine. And no, I'm not about to load the controls in code. I have so many controls within controls that it is a nightmare to line everything up without it. I tried a pre build event that made a file that has the solution directory in it, but of course how can I find that from common7\ide? All the projects files need to be in the solution directory because of svn. Thanks for your help guys, I've already spent a few hours fiddling with this in vain.

    Read the article

  • How can I break up long words instead of overflowing?

    - by ripper234
    How can I stop this text from overflowing? <html> <head> <style type="text/css"> .sticky { background-color: #FCFC80; margin: 5px; height: 100px; width: 135px; } .sticky .edit { vertical-align:middle; height: 100px; position:relative; color:Black; background-color:blue; height:90px; vertical-align:middle; width:90px; border-collapse:collapse; } </style> </head> <body> <div id="note44" class="sticky"> <div id="text44" class="edit" title="Click to edit" style="">A very long word: abcdefasdfasfasd</div> </div> </body> </html>

    Read the article

  • Tools for debugging when debugger can't get you there?

    - by brian1001
    I have a fairly complex (approx 200,000 lines of C++ code) application that has decided to crash, although it crashes a little differently on a couple of different systems. The trick is that it doesn't crash or trap out in debugger. It only crashes when the application .EXE is run independently (either the debug EXE or the release EXE - both behave the same way). When it crashes in the debug EXE, and I get it to start debugging, the call stack is buried down into the windows/MFC part of things, and isn't reflecting any of my code. Perhaps I'm seeing a stack corruption of some sort, but I'm just not sure at the moment. My question is more general - it's about tools and techniques. I'm an old programmer (C and assembly language days), and a relative newcomer (couple/few years) to C++ and Visual Studio (2003 for this projecT). Are there tricks or techniques anyone's had success with in tracking down crashing issues when you cannot make the software crash in a debugger session? Stuff like permission issues, for example? The only thing I've thought of is to start plugging in debug/status messages to a logfile, but that's a long, hard way to go. Been there, done that. Any better suggestions? Am I missing some tools that would help? Is VS 2008 better for this kind of thing? Thanks for any guidance. Some very smart people here (you know who you are!). cheers.

    Read the article

  • Quantifying the Performance of Garbage Collection vs. Explicit Memory Management

    - by EmbeddedProg
    I found this article here: Quantifying the Performance of Garbage Collection vs. Explicit Memory Management http://www.cs.umass.edu/~emery/pubs/gcvsmalloc.pdf In the conclusion section, it reads: Comparing runtime, space consumption, and virtual memory footprints over a range of benchmarks, we show that the runtime performance of the best-performing garbage collector is competitive with explicit memory management when given enough memory. In particular, when garbage collection has five times as much memory as required, its runtime performance matches or slightly exceeds that of explicit memory management. However, garbage collection’s performance degrades substantially when it must use smaller heaps. With three times as much memory, it runs 17% slower on average, and with twice as much memory, it runs 70% slower. Garbage collection also is more susceptible to paging when physical memory is scarce. In such conditions, all of the garbage collectors we examine here suffer order-of-magnitude performance penalties relative to explicit memory management. So, if my understanding is correct: if I have an app written in native C++ requiring 100 MB of memory, to achieve the same performance with a "managed" (i.e. garbage collector based) language (e.g. Java, C#), the app should require 5*100 MB = 500 MB? (And with 2*100 MB = 200 MB, the managed app would run 70% slower than the native app?) Do you know if current (i.e. latest Java VM's and .NET 4.0's) garbage collectors suffer the same problems described in the aforementioned article? Has the performance of modern garbage collectors improved? Thanks.

    Read the article

  • how to edit controls in a system::thread

    - by Ian Lundberg
    I need to be able to add items to a listbox inside of a thread. Code is below. 1. ref class Work 2. { 3. public: 4. static void RecieveThread() 5. { 6. while (true) 7. { 8. ZeroMemory(cID, 64); 9. ZeroMemory(message, 256); 10. if(recv(sConnect, message, 256, NULL) != SOCKET_ERROR && recv(sConnect, cID, 64, NULL) != SOCKET_ERROR) 11. { 12. ID = atoi(cID); 13. String^ meep = gcnew String(message); 14. lbxMessages->Items->Add(meep); 15. check = 1; 16. } 17. } 18. } 19. }; I get the error Error: a nonstatic member reference must be relative to a specific object on line 14. Is there any way to get it to let me do that? Because if I try to use String^ meep; outside of that Thread it doesn't contain anything. It works PERFECT when I use it within the thread but not outside of it. I need to be able to add that message to the listbox. If anyone can help I would appreciate it.

    Read the article

  • CSS - How to prevent the browser from showing scrollbars when a div goes outside of the window?

    - by xarfai
    I have a centered wrapper with following CSS: div.wrapper { width: 1170px; padding-left:30px; margin-top: 80px; margin-bottom:20px; margin-left: auto; margin-right: auto; position:relative; background-color:black; } inside i have a div with following css: position:absolute; top:-26px; left:517px; height:63px; z-index:3; inside of this div is an image which has 759px width, that makes the wrapper grow larger and makes the browser show a v-scrollbar on lower display resolutions. what i want is to make the image go outside the wrapper but prevent the browser from showing the scrollbar, so that the right side of the image is only shown if your browser window is large enough and the wrapper keeps its 1200px width. i can't make it a background image because it goes over some of the other content. something that is compatible with = IE7 would be nice

    Read the article

  • Should I be worried if I don't get any internships by 3rd year's end?

    - by karamba
    I am in some mediocre college in some corner of India. Am about to complete 3rd year C.S. in a month and a half. I have no idea how to go about "finding an internship" as everyone seems to put it. Looking at online advice, I find that a primary way is to "use your contacts". I am sad to say that I don't have many friends(those I have, I am trying to get help from them for all it's worth), and my family can't help me as they have no idea about the software industry. My college has no official facility for aiding students in this, and the few faculty members who had contacts in "whatever" part of the industry have favoured some students that they have personally come to know. (Though I hear that the "internships" they got involve them stocking equipment in some small companies.... still it's something?) I'm getting nervous. I am considering just spending the coming summer refining my skills in C++ and begin learning MySQL and C#, both of which I have zero experience in. Maybe work on my own project... like a library management system. Relative to those in my college, I think I am among the best programmers there, but that isn't saying much as a lot of students can barely write basic code. I have experience in teaching myself C++, and DirectX9 having created a Tetris clone, some basic 3D apps (bouncing balls), and a basic console-based, text-file-database-using library management system (which I plan to improve this summer). Is it alright if I spend my summer so? Will I be able to get a job later on? I know I have to improve my social skills to get anywhere in life, and I will try, but say I am stuck like this till 4th year's end... will such self studying, online learning help me in landing a decent job? Perhaps after I have learned a bit more, joining some open source project?

    Read the article

  • How to document an existing small web site (web application), inside and out?

    - by Ricket
    We have a "web application" which has been developed over the past 7 months. The problem is, it was not really documented. The requirements consisted of a small bulleted list from the initial meeting 7 months ago (it's more of a "goals" statement than software requirements). It has collected a number of features which stemmed from small verbal or chat discussions. The developer is leaving very soon. He wrote the entire thing himself and he knows all of the quirks and underlying rules to each page, but nobody else really knows much more than the user interface side of it; which of course is the easy part, as it's made to be intuitive to the user. But if someone needs to repair or add a feature to it, the entire thing is a black box. The code has some minimal comments, and of course the good thing about web applications is that the address bar points you in the right direction towards fixing a problem or upgrading a page. But how should the developer go about documenting this web application? He is a bit lost as far as where to begin. As developers, how do you completely document your web applications for other developers, maintainers, and administrative-level users? What approach do you use, where do you start, do you have a template? An idea of magnitude: it uses PHP, MySQL and jQuery. It has about 20-30 main (frontend) files, along with about 15 included files and a couple folders of some assets. So overall it's a pretty small application. It interfaces with 7 MySQL tables, each one well-named, so I think the database end is pretty self-explanatory. There is a config.inc.php file with definitions of consts like the MySQL user details, some from/to emails, and URLs which PHP uses to insert into emails and pages (relative and absolute paths, basiecally). There is some AJAX via jQuery. Please comment if there is any other information that would help you help me and I will be glad to edit it in.

    Read the article

  • php array problem ..need expert

    - by user295189
    I have tried this in another post but trying my luck again. My current array that I am making produce a different result than I am wanting. I want to have this kind of out put Row: 0: Column: 1: ID 1 Row: 1: Column: 1: ID 1 Row: 0: Column: 2: ID 2 Row: 1: Column: 2: ID 2 Row: 2: Column: 2: ID 2 Row: 3: Column: 2: ID 2 Row: 0: Column: 3: ID 3 Row: 1: Column: 3: ID 3 As you can see the Rows and columns change based on the ID. So if the ID is same it just go to next row in the same column. However if id is changed it goes to next column and rows start. Currently I my code looks like this for($i=0;$i<count($pv->rawData); $i++) { $relative=0; $relativeTypeID = -1; if ($pv->rawData[$i]->relativeTypeID != $relativeTypeID) { $relativeTypeID = $pv->rawData[$i]->relativeTypeID; $iTypeCount++; } if(!empty($pv->rawData[$i]->description)) { $pv->results[$i][$iTypeCount][0] = $pv->rawData[$i]->description; echo "Row: ".$i.": Column: ".$iTypeCount.": ID".$relativeTypeID." <br>"; } } It gives me the following output Row: 0: Column: 1: ID1 Row: 1: Column: 2: ID1 Row: 2: Column: 3: ID2 Row: 3: Column: 4: ID2 Row: 4: Column: 5: ID2 Row: 5: Column: 6: ID2 Row: 6: Column: 7: ID2 Row: 7: Column: 8: ID2 Row: 8: Column: 9: ID2 Row: 9: Column: 10: ID2 Row: 10: Column: 11: ID2 Row: 11: Column: 12: ID2 Row: 12: Column: 13: ID2 …. …. As you can see the Row and Columns are changing but not with ID number. I appreciate your help Thanks

    Read the article

  • Jquery + Prototype Question

    - by mikeyhill
    I recently inherited a site which is botched in all sorts of ways. I'm more of a php guy and initially the js was working just fine. I made no changes to the javascript or the any of the include files but after making a few content edits I'm getting errors from firebug. a.dispatchEvent is not a function emptyFunction()protot...ects.js (line 2) emptyFunction()protot...ects.js (line 2) fireContentLoadedEvent()protot...ects.js (line 2) [Break on this error] var Prototype={Version:'1.6.0.2',Brows...pe,Enumerable);Element.addMethods(); protot...ects.js (line 2) this.m_eTarget.setStyle is not a function [Break on this error] this.m_eTarget.setStyle( { position: 'relative', overflow:'hidden'} ); protot...ects.js (line 43) uncaught exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE)" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: js/prototype_effects.js :: anonymous :: line 2" data: no] Googling around I found several posts that sometimes jquery+prototype don't play well and rearranging the scripts could fix this issue, however being that I didn't touch these sections I'm not sure where I even need to begin to debug. The previous developer incorporated a head.inc file which loads up prototype, scriptaculous and then many of the pages are in a sub-template loading up jquery for functions like lightbox. The site is temp housed at http://dawn.mikeyhill.com Any help is appreciated.

    Read the article

  • CSS Heart with Text within

    - by user3696456
    I would like to put a name into a heart made with CSS. And I can't seem to figure out how to do it. I have this code already: #heart { position:relative; width:100px; height:100px; } #heart:before,#heart:after { position:absolute; content:""; left:50px; top:0; width:50px; height:80px; background:#F00000; -moz-border-radius:50px 50px 0 0; border-radius:50px 50px 0 0; -webkit-transform:rotate(-45deg); -moz-transform:rotate(-45deg); -ms-transform:rotate(-45deg); -o-transform:rotate(-45deg); transform:rotate(-45deg); -webkit-transform-origin:0 100%; -moz-transform-origin:0 100%; -ms-transform-origin:0 100%; -o-transform-origin:0 100%; transform-origin:0 100%; } #heart:after { left: 0; -webkit-transform:rotate(45deg); -moz-transform:rotate(45deg); -ms-transform:rotate(45deg); -o-transform:rotate(45deg); transform:rotate(45deg); -webkit-transform-origin:100% 100%; -moz-transform-origin:100% 100%; -ms-transform-origin:100% 100%; -o-transform-origin:100% 100%; transform-origin:100% 100%; } When I try to write the name directly into the div: "#heart", it just puts the text behind. Thanks in advance for any help!

    Read the article

  • Running Java Program linking to thirdpary library (java -jar) issue ( Multiple methods tried )

    - by bamachrn
    This issue is related to running a Java program (jar) dependent on thirdparty jar library even after setting classpath and trying so many other methods by reading articles in Internet. I want to use a thirdparty Pack1.jar (it is not a part of jvm) as dependency of my programme. I do not know where the Pack1.jar file could be in the deployment machine and I want the deployer to specify the path for the thirdparty libraries I have tried the following alternatives in vain Setting the java.class.path programatically String class_path = args[0]; System.setProperty("java.class.path",class_path); Here I am assuming that deployer would supply the classpath as first argument while running the program Setting the CLASSPATH env_var to locate the thirdparty directory While running, using the classpath option java -classpath /path/to/Pack1.jar -jar Pack2.jar I think this would not work because documentation says that classpath is ignored when program is run with "java -jar" Setting the java.ext.dirs programatically. Setting the java.library.path programatically. I do not want to specify the Class-Path in manifest because that takes only relative path and I do not know where the thirdparty library would be kept in deployment machine But I am unable to get the jar running. How can I fix this problem any help please.

    Read the article

  • What is the n in O(n) when comparing sorting algorithms?

    - by Mumfi
    The question is rather simple, but I just can't find a good enough answer. I've taken a look at the most upvoted question regarding the Big-Oh notation, namely this: Plain English explanation of Big O It says there that: For example, sorting algorithms are typically compared based on comparison operations (comparing two nodes to determine their relative ordering). Now let's consider the simple bubble sort algorithm: for (int i = arr.length - 1; i > 0 ; i--) { for (int j = 0; j<i; j++) { if (arr[j] > arr[j+1]) { switchPlaces(...) } } } I know that worst case is O(n^2) and best case is O(n), but what is n exactly? If we attempt to sort an already sorted algorithm (best case), we would end up doing nothing, so why is it still O(n)? We are looping through 2 for-loops still, so if anything it should be O(n^2). n can't be the number of comparison operations, because we still compare all the elements, right? This confuses me, and I appreciate if someone could help me.

    Read the article

  • EXE stops working if containing folder is renamed. MSVCP90.dll

    - by John
    This popup comes up as soon as the app is started: The program can't start because MSVCP90.dll is missing from your computer. Before anyone says "install the VC++ runtimes", wait! If I rename the folder containing my .EXE then the app runs. If I rename it back, it breaks. The app has been running for weeks without any changes to my system/VS installation (2008 SP1), we suddenly spotted this error a few days ago. Lost as to why the name of the dir is causing issues... again this has not changed in months and all our resource paths are relative anyway, e.g "../someOtherDir/...." It doesn't just do this on my PC, we have the /bin dir (the one containing EXE) in SVN and suddenly everyone started seeing the same issue, even though the binaries themselves seem just fine. Is it possible some additional data got put into SVN and that's the cause? Since it's not just one PC, there must be something either in SVN or the EXE itself... Note this popup comes before our code even gets to run.

    Read the article

  • Why does this CSS button mess with <a> tags?

    - by Ian McCullough
    Here is my CSS button { border: 0 none; cursor: pointer; padding: 0 15px 0 0; text-align: center; height: 30px; line-height: 30px; width: auto; } button a { color:white; text-decoration:none; } button.rounded { background: transparent url(/images/button/btn_right.png) no-repeat scroll right top; clear: left; font-size: 0.8em; } button span { display: block; padding: 0 0 0 15px; position: relative; white-space: nowrap; height: 30px; line-height: 30px; } button.rounded span { background: transparent url(/images/button/btn_left.png) no-repeat scroll left top; color: #FFFFFF; } button.rounded:hover { background-position: 100% -30px; } button.rounded:hover span { background-position: 0% -30px; } button::-moz-focus-inner { border: none; } Here is the code for my "button" with a link in it. <button class="rounded"><span><a href="profile.php">Profile</a></span></button> The issue is it does not link to the href when i click on it. Anyone know why?

    Read the article

  • Padding between images doesn't pad

    - by ripper234
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <style type="text/css"> #action-icons { float:right; } #action-icons.img { position:relative; top:-30px; padding-right:200px; } </style> </head> <body> <h1 class="edit">Some nifty title <span id="action-icons"> <img src="foo.png" width="64" height="64" alt="" id="newsticky"/> <img src="bar.png" width="60" height="60" alt="" id="trash"/> </span> </h1> </body> </html>

    Read the article

  • Fit into div in CSS

    - by Teodoris
    Hello everyone my menu bar can't fit into my <div> area at different browser. I have checked with Opera and Chrome it looks fine but with Explorer and Firefox my menu can't fit. And my menu is in this <div> tag: .page { width: 964px; margin-left: auto; margin-right: auto; background-image:url(../images2/images/orta_alan_bg_GOLGE.png); background-repeat:repeat-y; } Here is my menu: ul#menu { padding: 0 0 2px; position: relative; margin: 0; text-align: center; } ul#menu li { display: inline; list-style: none; font-family: 'Museo300Regular'; font-size:17px; font-style:normal; } ul#menu li a { background-image:url(../../images2/images/menu_bg_normal.jpg); background-repeat: repeat; padding: 5px 19px 5px; font-weight: normal; text-decoration: none; line-height: 2.8em; background-color: #e8eef4; color: #FEFEFF; border-radius: 4px 4px 0 0; -webkit-border-radius: 4px 4px 0 0; -moz-border-radius: 4px 4px 0 0; cursor:pointer; } So what is the problem why it can't fit into with Explorer and Firefox? I attach an image you can understand what I mean Here is the Chrome and Opera it can fit

    Read the article

  • my div tag is not aligning properly after jquery.html replacement

    - by Adam
    <div class="container"><span class="field_label">Job</span><input class="fields2" type="text" maxlength="200" name="first_name" /></div> <div class="container"><span class="field_label">Date</span><input class="fields2" type="text" maxlength="200" name="the_date" id="the_date" /></div> <div class="container" id="sched_text">sdfdsfdsf</div> <!-- schedule text--> <div class="container"><span class="field_label">Time</span> .container{ position:relative; display:block; float:right; border: 1px solid; padding-bottom: 10px; } my html/css here has my containers aligning right below each other. However, when I use .html in jquery to change or add text to sched_text it throws the css off and places the div tag not as a block anymore but placed somewhere to the side. Does something change when you use .html text? what would the proper way of doing it? Thanks Ok the issue is that my .html or .text is not a string. I just did .text(the_Week[i][1]); which results in a number. How do I present it as a string?

    Read the article

  • Scientific Data processing (Graph comparison and interpretation)

    - by pinkynobrain
    Hi stackoverflow friends, I'm trying to write a program to automate one of my more boring and repetitive work tasks. I have some programming experience but none with processing or interpreting large volumes of data so I am seeking your advice (both suggestions of techniques to try and also things to read to learn more about doing this stuff). I have a piece of equipment that monitors an experiment by taking repeated samples and displays the readings on its screen as a graph. The input of experiment can be altered and one of these changes should produce a change in a section of the graph which I currently identify by eye and is what I'm looking for in the experiment. I want to automate it so that a computer looks at a set of results and spots the experiment input that causes the change. I can already extract the results from the machine. Currently they results for a run are in the form of an integer array with the index being the sample number and the corresponding value being the measurement. The overall shape of the graph will be similar for each experiment run. The change I'm looking for will be roughly the same and will occur in approximately the same place every time for the correct experiment input. Unfortunately there are a few gotchas that make this problem more difficult. There is some noise in the measuring process which mean there is some random variation in the measured values between different runs. Although the overall shape of the graph remains the same. The time the experiment takes varies slightly each run causing two effects. First, the a whole graph may be shifted slightly on the x axis relative to another run's graph. Second, individual features may appear slightly wider or narrower in different runs. In both these cases the variation isn't particularly large and you can assume that the only non random variation is caused by the correct input being found. Thank you for your time, Pinky

    Read the article

  • Retrieving the first picture with a HTML parser

    - by justin01
    Hey guys, (Not a native english speaker) I'm doing a personal project in PHP in which I use the Simple HTML Parser to parse the HTML of a given URL and retrieve the first image in a DIV that have a specific ID or class (maincontent, content, main, wrapper, etc. - it's all in an array) and ignore ads. The goal is to take this image and make a thumbnail with it, pretty much like on Digg and others. I thought everything was working fine until I tried my script with the website Snopes ("http://www.snopes.com/photos/animals/luckycoyote.asp" <- this page more exactly). The source of the first image it gets is: " graphics/luckycoyote1.jpg ". So far, to correct this problem I created a little function that gets the domain name of the given URL and insert it before the IMG's source attribute. So for sites like Snopes.com, it gives me: "http://www.snopes.com/graphics/luckycoyote1.jpg" ... while the real URL for this image is "http://www.snopes.com*/photos/animals/graphics/luckycoyote1.jpg*" (or, more precisely: " http://graphics1.snopes.com/photos/animals/graphics/luckycoyote1.jpg " - note the subdomain here). So my main question is: how can I externally/dynamically retrieve the full URL address of an image ("absolute path") when I am only given the "relative path"? I'm pretty sure this is possible, since when I paste the link in Facebook's "What are you doing?" field for example, it gives me the correct path to the image while on the website, the source of the image is only (example) "image/photo/example.jpg". Thank you for your time.

    Read the article

  • Jquery cycle plugin containerResize option

    - by user1193385
    Im using jquery cycle on have a fade slideshow like so... $('.pics').cycle({ fx: 'fade', timeout:5000, random: 1, containerResize: false }); it was working fine before but since I added containerResize: false my images wont show up anymore...does anyone know what its doing this?...example at http://willruppelglass.com/index.php here is some other code, might help, never know.... .pics { padding: 0; margin: 0; } .pics img { background-color: #eee; height: 200px; text-align:center; top: 0; left: 0; } .contentImages{ border:1px solid #CCC; padding:10px; margin:20px auto 0; position:relative; width: 600px; overflow:hidden; } <div class="contentImages"> <div class="pics"> <img src="upload/<?php echo $array['image'] ?>" height="200" /> <img src="upload/<?php echo $array['image2'] ?>" height="200" /> <img src="upload/<?php echo $array['image3'] ?>" height="200" /> </div> </div>

    Read the article

  • How do I unbind another jQuery function on .click()?

    - by Mike Barwick
    I have this script that run to fix my menu bar to the browser on scroll. Nothing really needs to change here (works as it should). However, you may need it... var div = $('#wizMenuWrap'); var editor = $('#main_wrapper'); var start = $(div).offset().top; $(function fixedPackage(){ $.event.add(window, "scroll", function() { var p = $(window).scrollTop(); $(div).css('position',((p)>start) ? 'fixed' : 'static'); $(div).css('top',((p)>start) ? '0px' : ''); //Adds TOP margin to #main_wrapper (required) $(editor).css('position',((p)>start) ? 'relative' : 'static'); $(editor).css('top',((p)>start) ? '88px' : ''); }); }); Now for the issue at hand. I have another script function that calls a modal pop-up (which again works as it should). However, it's not slick from a UI perspective when I scroll the page when the modals open. So I want to disable the script above when the modal script below is called. In other words, when I click to open the modal pop-up, the script above shouldn't work. $(function () { var setUp = $('.setupButton'); // SHOWS SPECIFIED VIEW $(setUp).click(function () { $('#setupPanel').modal('show'); //PREVENTS PACKAGE SELECT FIXED POSITION ON SCROLL $(setUp).unbind('click',fixedPackage); }); }) As you can see above, I tried to unbind the scroll function (the first code snippet), but this is not correct. These two scripts are in two separate js libraries.

    Read the article

< Previous Page | 109 110 111 112 113 114 115 116 117 118 119 120  | Next Page >