Daily Archives

Articles indexed Sunday July 1 2012

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

  • Apple wireless mouse and keyboard doens't work

    - by drigoSkalWalker
    I paired the mouse and keyboard on ubuntu, but it seems not work. I got this error in /var/log/syslog kernel: [ 1875.935712] input: Apple Magic Mouse as /devices/pci0000:00/0000:00:12.0/usb4/4-3/4-3:1.0/bluetooth/hci0/hci0:2/input34 kernel: [ 1875.935885] evdev: no more free evdev devices kernel: [ 1875.935893] input: failed to attach handler evdev to device input34, error: -23 kernel: [ 1875.936049] magicmouse 0005:05AC:030D.0003: input,hidraw0: BLUETOOTH HID v3.06 Mouse [Apple Magic Mouse] on 00:19:5D:0F:4A:F6 kernel: [ 2334.787710] input: Apple Wireless Keyboard as /devices/pci0000:00/0000:00:12.0/usb4/4-3/4-3:1.0/bluetooth/hci0/hci0:4/input36 kernel: [ 2334.787729] evdev: no more free evdev devices kernel: [ 2334.787737] input: failed to attach handler evdev to device input36, error: -23 kernel: [ 2334.787999] generic-bluetooth 0005:05AC:0255.0005: input,hidraw1: BLUETOOTH HID v0.50 Keyboard [Apple Wireless Keyboard] on 00:19:5D:0F:4A:F6 Nothing appears in xinput --list, only the wired mouse and keyboard. How to fix that?

    Read the article

  • ubuntu 12.04 desktop Error: unknown command 'gfxmode'. Pressing any key continues

    - by Andy
    Premise: linux noobie here, I have the same issue as OP: fresh 12.04 desktop, changed grub with grub customizer, now I get a: unknown command 'gfxmode' press ...etc was asked to "re-post" this question and link to this thread which I refer to above. I have tried what Tarek said, and nothing seems to work, I find two lines with gfxmode: function gfxmode { gfxmode \$linux_gfx_mode Note: not sure if it matter but in the error the two single quotes before gfxmode are not the same, the first is a slanted quote mark, the second (after gfxmode) is a straight one. I commented out the whole line, I tried to add 'set' before gfxmode, neither did any difference. I found another place that said to remove the line from another file 40_custom, but I checked and those files do not contain anything relating to the line we are looking for: gfxmode $linux_gfx_mode Not sure what I am missing, but the file linux.save has recently appeared when searching for the line. Not sure if its just a temp file of some kind. In any case I cannot seem to get it, what am I missing? Thanks! P.S. sorry for any messups in form :)

    Read the article

  • Fan working non-stop on a Dell Inspiron 5110

    - by cankemik
    First of all i'm new at ubuntu. I've only tried 11.10 before 12.04. Since then my notebook's(Dell Insprion 5110) fan was working non-stop. And also battery lasts in 2 hours. So i made a research. Some said it's about graphics card driver. I've tried so many things, so many codes but i get no result. I must say that i've tried ironhide and bumblebee. non of them worked 00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) 01:00.0 VGA compatible controller: NVIDIA Corporation GF108 [GeForce GT 540M] (rev ff)

    Read the article

  • How to completely shutdown Ati card

    - by Celso
    I would like to know how do i prevent my Ati card from turning on when i enter on ubuntu 11.10. My bios only lets-me shutdown intel hd card or leave the both on but i want to know if is possbible to completely shutdown without having to access to the bios.( if is possible to turn of without using Vgaswitcheroo even better!) My system is: Acer 3820tg-- intel core i3 350M, 2.26 Ghz L3, Ati Mobility Radeon HD 5470 up to 2138 MB hyper memory, 13,3" HD LED LCD, 4gb DDR3, SSD corsair 60GB sata 2. EDIT: I now know what is missing on the answers! I edited /etc/rc.local file and added the next lines: Sleep 3 echo ON /sys/kernel/debug/vgaswitcheroo/switch echo IGD /sys/kernel/debug/vgaswitcheroo/switch echo OFF /sys/kernel/debug/vgaswitcheroo/switch And then save the file and restart. It should be possible to use only the intel card now. By the way, i didn't blacklisted the radeon driver because doing it make my ati card wake up. (use it at your own risk. i only tested in my system)

    Read the article

  • Shortcut to change Launcher 'Hide' setting

    - by joris
    When I'm working on my laptop I have periods that I am only using a couple of programs, so the default intellihide setting of the Launcher ('Dodge windows') is very handy. But I also have periods that I have to switch very often between programs, and then I find it very useful (and better for my workflow) that the Launcher doesn't hide. Now, every time I wan't to switch I have to open CCSM and change the setting (Unity plugin - Hide Launcher), but it would be easier if I could use a shortcut for it. So my question: Is there a way to create a shortcut to switch between (or change) the two settings of Compiz? I thought of command line interface to compiz, but I couldn't directly find something like that.

    Read the article

  • What effect does using itemprop="significantLinks" on anchors have for SEO?

    - by hdavis84
    So as I've described in a previous post about span tags within head tags, I'm practicing application of microdata via http://schema.org. Anyone who's browsed the documentation there knows that there's a lot of need for improvement for more clear understandings on use for each property. My question on this post is more about the "significantLinks" property and how it effects SEO for on page, in content anchored text. Does anyone have any more information regarding whether its good to use for link optimization? I understand what schema.org means that it's to be used on "non-navigational links" and those links should be relevant to the current page's meaning. But will using this property hurt SEO or make SEO better for each page? Thanks in advance, as by answering this with accurate information you are helping not just me, but many people who are trying to make their customers more successful through helping their rank for relevant keywords to their business, bringing them more search engine traffic.

    Read the article

  • would it be bad to put <span> tags within the <head>, for grouping meta data in schema.org format?

    - by hdavis84
    Alright, I'm currently practicing schema.org microdata, and trying to find the best route for every site I build. I have found that i can piggyback itemprops on open graph meta tags. I would like to piggyback more itemprops on opengraph meta tags. However, schema.org requires you to change itemtypes to define all aspects of a "thing". Say I'm defining a LocalBusiness. Open graph has street address, locality, and region i'd like to piggyback on. I'd have to do something like: <html lang="en" itemscope itemtype="http://schema.org/LocalBusiness"> <head> ... <meta itemprop="name" content="Business Name" /> <meta property="og:url" itemprop="url" content="http://example.com" /> <meta property="og:image" itemprop="image" content="http://example.com/logo.png" /> <span itemprop="address" itemscope itemtype="http://schema.org/PostalAddress"> <meta property="og:street-address" itemprop="streetAddress" content="1234 Amazing Rd." /> <meta property="og:locality" itemprop="addressLocality" content="Greenfield" /> <meta property="og:region" itemprop="addressRegion" content="IN" /> </span> </head> Although there's more that can be added in, this is enough of an example to show what I'm trying to achieve. I've searched the web to see if it is an issue to use spans in the head or not, because I don't want invalid markup. I know I can mark up the address information in the body of the pages, but the route above would be more efficient. Does anyone have an answer for this?

    Read the article

  • Bad Bot blocking Revisited

    - by Tom
    I've read a lot about bad bot blocking, php scripts, .htaccess techniques, etc... Is this a valid method? Since .htacces can rewrite and send a bad bot a 403 deny or forward to something like spam poison, is it possible to Disallow a folder, then through .htaccess in that specific folder redirect to spampoison? Since Apache reads each .htaccess independently and follows specific instructions, then a bad bot not following robots.txt would just be redirected. Or anyone trying to access, /badbot/ or whatever I choose to call my trap folder. Thanks Tom

    Read the article

  • Subdomain Is Redirected and Causing an Error Because www. is Added

    - by user532493
    On my site, say example.com, if I try to access test.example.com, Firefox automatically adds www. to test.example.com, making it www.test.example.com, which causes an error. However, if I visit a site like my.ebay.com, no www. is added so no error occurs. What's going on? Just in case, my .htaccess file is as follows: Options -Multiviews RewriteEngine On RewriteCond %{HTTP_HOST} ^example.com RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ $1.php I looked through Firebug and it seems like Firefox doesn't even make an attempt to reach test.example.com before reverting to www.test.example.com. One nuance I didn't realize until now. If I try to access the site using test.example.com/, the www. is added. If however that trailing slash is not there, then I am sent to the subdomain properly.

    Read the article

  • Would someone please explain Octree Collisions to me?

    - by A-Type
    I've been reading everything I can find on the subject and I feel like the pieces are just about to fall into place, but I just can't quite get it. I'm making a space game, where collisions will occur between planets, ships, asteroids, and the sun. Each of these objects can be subdivided into 'chunks', which I have implemented to speed up rendering (the vertices can and will change often at runtime, so I've separated the buffers). These subdivisions also have bounding primitives to test for collision. All of these objects are made of blocks (yeah, it's that kind of game). Blocks can also be tested for rough collisions, though they do not have individual bounding primitives for memory reasons. I think the rough testing seems to be sufficient, though. So, collision needs to be fairly precise; at block resolution. Some functions rely on two blocks colliding. And, of course, attacking specific blocks is important. Now what I am struggling with is filtering my collision pairs. As I said, I've read a lot about Octrees, but I'm having trouble applying it to my situation as many tutorials are vague with very little code. My main issues are: Are Octrees recalculated each frame, or are they stored in memory and objects are shuffled into different divisions as they move? Despite all my reading I still am not clear on this... the vagueness of it all has been frustrating. How far do Octrees subdivide? Planets in my game are quite large, while asteroids are smaller. Do I subdivide to the size of the planet, or asteroid (where planet is in multiple divisions)? Or is the limit something else entirely, like number of elements in the division? Should I load objects into the octrees as 'chunks' or in the whole, then break into chunks later? This could be specific to my implementation, I suppose. I was going to ask about how big my root needed to be, but I did manage to find this question, and the second answer seems sufficient for me. I'm afraid I don't really get what he means by adding new nodes and doing subdivisions upon adding new objects, probably because I'm confused about whether the tree is maintained in memory or recalculated per-frame.

    Read the article

  • How much game dev does $x amount of money get you?

    - by Frank
    How much a game costs to make gets asked often and is always answered with it depends or varies on the quality of the game. Well this is basically the same question but is a bit more precise. I'm wonder what quality of game you can make with varying degrees of funds. Lets say 500k, 1m, 2m, 5m, 10m, 15m, and 20m. Let's assume you don't do any of it yourself and it only covers development only... no advertising or manufacturing.

    Read the article

  • Rotating wheel with touch (adding momentum and slowing down the initial rate it can be moved

    - by Lewis
    I have a wheel control in a game which is setup like so: - (void)ccTouchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; CGPoint location = [touch locationInView:[touch view]]; location = [[CCDirector sharedDirector] convertToGL:location]; if (CGRectContainsPoint(wheel.boundingBox, location)) { CGPoint firstLocation = [touch previousLocationInView:[touch view]]; CGPoint location = [touch locationInView:[touch view]]; CGPoint touchingPoint = [[CCDirector sharedDirector] convertToGL:location]; CGPoint firstTouchingPoint = [[CCDirector sharedDirector] convertToGL:firstLocation]; CGPoint firstVector = ccpSub(firstTouchingPoint, wheel.position); CGFloat firstRotateAngle = -ccpToAngle(firstVector); CGFloat previousTouch = CC_RADIANS_TO_DEGREES(firstRotateAngle); CGPoint vector = ccpSub(touchingPoint, wheel.position); CGFloat rotateAngle = -ccpToAngle(vector); CGFloat currentTouch = CC_RADIANS_TO_DEGREES(rotateAngle); wheelRotation += (currentTouch - previousTouch) * 0.6; //limit speed 0.6 } } Now once the user lets go of the wheel I want it to rotate back to where it was before but not without taking into account the momentum of the swipe the user has done. This is the bit I really can't get my head around. So if the swipe generates a lot of momentum then the wheel will carry on moving slightly in that direction until the overall force which pulls the wheel back to the starting position kicks in. Any ideas/code snippets?

    Read the article

  • How do client-server cooperation based games like Diablo 3 work?

    - by edgar
    Diablo 3 cooperates with Blizzard servers even during single player games. In fact, Blizzard has had problems with the games "melting their servers." I would like to ask: How do the client and the server communicate? What details does the client leave to the server, and vice versa? What details are redundant - both the client and the server know - and how often do they disagree? The previous paragraph contains the important questions, but I have a few more that I must explain my motivation towards. I am interested in the programming of botting. Ethical botting - I don't plan on actually abusing the automation to run 24/7. I just find it to be a great programming challenge to glean information from a game, and then make decisions from that information. I am stuck in the starting gate. The unofficial questions from this post would be: How can I make a bot (language, tools, libraries)? Can I get information through the communication between client and server, rather than the brute force pixel detection easily used in more static games? There probably is a trust issue, and to that all I can say is that I promise not to abuse the answers. But please feel free to answer any of the questions you feel comfortable with. Thank you!

    Read the article

  • Alternatives to the GPL

    - by Bane
    I made a game, and I am currently making a game engine. I want them both to be completely free and open source. What license should I choose? I was reading a bit on GPL, but that seems to be more suited for system code and libraries, AFAIK, as it doesn't permit the use of code for proprietorial software - which, in turn, implies that the code can be used in the first place. I can see that, obviously, game engines can be considered libraries, and therefor be used, but what about game code? Is there an alternative to GPL?

    Read the article

  • Where clause in joins vs Where clause in Sub Query

    - by Kanavi
    DDL create table t ( id int Identity(1,1), nam varchar(100) ) create table t1 ( id int Identity(1,1), nam varchar(100) ) DML Insert into t( nam)values( 'a') Insert into t( nam)values( 'b') Insert into t( nam)values( 'c') Insert into t( nam)values( 'd') Insert into t( nam)values( 'e') Insert into t( nam)values( 'f') Insert into t1( nam)values( 'aa') Insert into t1( nam)values( 'bb') Insert into t1( nam)values( 'cc') Insert into t1( nam)values( 'dd') Insert into t1( nam)values( 'ee') Insert into t1( nam)values( 'ff') Query - 1 Select t.*, t1.* From t t Inner join t1 t1 on t.id = t1.id Where t.id = 1 Query 1 SQL profiler Result Reads = 56, Duration = 4 Query - 2 Select T1.*, K.* from ( Select id, nam from t Where id = 1 )K Inner Join t1 T1 on T1.id = K.id Query 2 SQL Profiler Results Reads = 262 and Duration = 2 You can also see my SQlFiddle Query - Which query should be used and why?

    Read the article

  • Soundcloud uploading to specific set/playlist

    - by user1492347
    I'm uploading some audio to soundcloud, but would like to add the audio to a specific playlist i have also created, without making an extra request (see "Adding Sounds to a Set" http://developers.soundcloud.com/docs/api/guide#uploading). Is it possible to upload directly to a playlist? Alternatively, I could send an extra request to add the track to the playlist but how would you do this in AS3. I see examples for JavaScript but am unsure how this would work in Flash.

    Read the article

  • My winform application doesn't work on others' pc without vs 2010 installed

    - by wings
    Just like I said, my winform application works properly on computers with VS installed, but on other computers, it will crash due to a FileNotFound Exception. I used using Application = Microsoft.Office.Interop.Excel.Application; in my source code to generate a Excel file, and the problem occurs as soon as the Excel-related function is called. But I don't know what it refers to exactly. Do I have to get some .dll included along with the .exe file? And what DLL is that? Below are part of my codes: private void FileExport(object objTable) { StartWaiting(); string[,] table = null; try { table = (string[,])objTable; } catch (Exception ex) { ShowStatus(ex.Message, StatusType.Warning); } if (table == null) { return; } Application excelApp = new Application { DisplayAlerts = false }; Workbooks workbooks = excelApp.Workbooks; Workbook workbook = workbooks.Add(XlWBATemplate.xlWBATWorksheet); Worksheet worksheet = (Worksheet)workbook.Worksheets[1]; worksheet.Name = "TABLE"; for (int i = 0; i < table.GetLength(0); i++) { for (int j = 0; j < table.GetLength(1); j++) { worksheet.Cells[i + 1, j + 1] = table[i, j]; } } Range range = excelApp.Range["A1", "H1"]; range.Merge(); range.Font.Bold = true; range.Font.Size = 15; range.RowHeight = 50; range.EntireRow.AutoFit(); range = excelApp.Range["A2", "H8"]; range.Font.Size = 11; range = excelApp.Range["A1", "H8"]; range.NumberFormatLocal = "@"; range.RowHeight = 300; range.ColumnWidth = 50; range.HorizontalAlignment = XlHAlign.xlHAlignCenter; range.VerticalAlignment = XlVAlign.xlVAlignCenter; range.EntireRow.AutoFit(); range.EntireColumn.AutoFit(); worksheet.UsedRange.Borders.LineStyle = 1; Invoke(new MainThreadInvokerDelegate(SaveAs), new object[] { worksheet, workbook, excelApp } ); EndWaiting(); }

    Read the article

  • Is it possible that two requests at the same time double this code? (prevent double database entry)

    - by loostro
    1) The controller code (Symfony2 framework): $em = $this->getDoctrine()->getEntityManager(); // get latest toplist $last = $em->getRepository('RadioToplistBundle:Toplist')->findOneBy( array('number' => 'DESC') ); // get current year and week of the year $week = date('W'); $year = date('Y'); // if: // [case 1]: $last is null, meaning there are no toplists in the database // [case 2]: $last->getYear() or $last->getWeek() do not match current // year and week number, meaning that there are toplists in the // database, but not for current week // then: // create new toplist entity (for current week of current year) // else: // do nothing (return) if($last && $last->getYear() == $year && $last->getWeek() == $week) return; else { $new = new Toplist(); $new->setYear($year); $new->setWeek($week); $em->persist($new); $em->flush(); } This code is executed with each request to view toplist results (frontend) or list of toplists (backend). Anytime someone wants to access the toplist we first check if we should create a new toplist entity (for new week). 2) The question is: Is it possible that: User A goes to mydomain.com/toplist at 00:00:01 on Monday - the code should generate new entity the server slows down and it takes him 3 seconds to execute the code so new toplist entity is saved to database at 00:00:04 on Monday User B goes to mydomain.com/toplist at 00:00:02 on Monday at 00:00:02 there the toplist is not yet saved in database, thus UserB's request triggers the code to create another toplist entity And so.. after a few seconds we have 2 toplist entities for current week. Is this possible? How should I prevent this?

    Read the article

  • Loading an external .htm file into a div with javascript

    - by Mads Friis
    So I got this code Javascript: <script type="text/javascript"> $(function(){ $('.ajax') .click(function(e){ e.preventDefault() $('#content').load( 'file.htm' ) }) }) </script> html: <a href="file.htm" class="ajax">Link</a> it works perfectly in firefox, but nothing happens when I click the link in chrome and IE simply opens a new window with the file. any advice?

    Read the article

  • remove spaces in string using javascript

    - by reza saberi
    I need to do some functions on some text field contents before submitting the form, like checking the validity of the customer registeration code, having the customer name as his code in customers table appending an incrementing number. I don't want to do it after the form is submitted becuase I need it to be displayed in the code field before submitting the form. My code: function getCode(){ var temp = document.getElementById("temp").value ; var d = parseInt(document.getElementById("temp").value) + 1; document.getElementById("customernumber").value = d; document.getElementById("code").value = document.getElementById("name").value+"-"+ d; } It all works fine, but the last line of code developed the code WITH the spaces between the code.

    Read the article

  • How to find full module path of a class to import in other file

    - by Pooya
    I have method that returns module path of given class name def findModulePath(path, className): attributes = [] for root, dirs, files in os.walk(path): for source in (s for s in files if s.endswith(".py")): name = os.path.splitext(os.path.basename(source))[0] full_name = os.path.splitext(source)[0].replace(os.path.sep, '.') m = imp.load_module(full_name, *imp.find_module(name, [root])) try: attr = getattr(m, className) attributes.append(attr) except: pass if len(attributes) <= 0: raise Exception, "Class %s not found" % className for element in attributes: print "%s.%s" % (element.__module__, className) but it does not return the full path of the module, For example I have a python file named "objectmodel" in objects package,and it contains a Model class, So I call findModulePath(MyProjectPath,"Model"). it prints objectmodel.Model but I need objects.objectmodel.Model

    Read the article

  • What can be used instead of Datatable in LINQ

    - by Kabi
    I have a SQL query that returns a Datatable: var routesTable = _dbhelper.Select("SELECT [RouteId],[UserId],[SourceName],[CreationTime] FROM [Routes] WHERE UserId=@UserId AND RouteId=@RouteId", inputParams); and then we can work with Datatable object of routesTable if (routesTable.Rows.Count == 1) { result = new Route(routeId) { Name = (string)routesTable.Rows[0]["SourceName"], Time = routesTable.Rows[0]["CreationTime"] is DBNull ? new DateTime() : Convert.ToDateTime(routesTable.Rows[0]["CreationTime"]) }; result.TrackPoints = GetTrackPointsForRoute(routeId); } I want to change this code to linq but I don't know how can I simulate Datatable in LINQ ,I wrote this part: Route result = null; aspnetdbDataContext aspdb = new aspnetdbDataContext(); var Result = from r in aspdb.RouteLinqs where r.UserId == userId && r.RouteId==routeId select r; .... but I don't know how can I change this part: if (routesTable.Rows.Count == 1) { result = new Route(routeId) { Name = (string)routesTable.Rows[0]["SourceName"], Time = routesTable.Rows[0]["CreationTime"] is DBNull ? new DateTime() : Convert.ToDateTime(routesTable.Rows[0]["CreationTime"]) }; would you please tell me how can I do this? EDIT here you can see the whole block of code in original public Route GetById(int routeId, Guid userId) { Route result = null; var inputParams = new Dictionary<string, object> { {"UserId", userId}, {"RouteId", routeId} }; var routesTable = _dbhelper.Select("SELECT [RouteId],[UserId],[SourceName],[CreationTime] FROM [Routes] WHERE UserId=@UserId AND RouteId=@RouteId", inputParams); if (routesTable.Rows.Count == 1) { result = new Route(routeId) { Name = (string)routesTable.Rows[0]["SourceName"], Time = routesTable.Rows[0]["CreationTime"] is DBNull ? new DateTime() : Convert.ToDateTime(routesTable.Rows[0]["CreationTime"]) }; result.TrackPoints = GetTrackPointsForRoute(routeId); } return result; }

    Read the article

  • How to get title from a website by xpath?

    - by qxxx
    I am playing around with xpath, but have no Idea how to for example get a title from a website using xpath, here is my code but I don't know what to do next... $dom = new DOMDocument(); $dom->loadHTMLFile("http://www.cool.de"); $x=new DOMXPath($dom); $result = $x->query("//TITLE"); //...??? and print_r($result) shows me only "Object", is there a function like print_r to see what is inside an object so I don't have to guess?

    Read the article

  • How can I use multi-threading with a "for" or "foreach" loop?

    - by saafh
    I am trying to run the for loop in a separate thread so that the UI should be responsive and the progress bar is visible. The problem is that I don't know how to do that :). In this code, the process starts in a separate thread, but the next part of the code is executed at the same time. The messageBox is displayed and the results are never returned (e.g. the listbox's selected index property is never set). It doesn't work even if I use, "taskEx.delay()". TaskEx.Run(() => { for (int i = 0; i < sResults.Count(); i++) { if (sResults.ElementAt(i).DisplayIndexForSearchListBox.Trim().Contains(ayaStr)) { lstGoto.SelectedIndex = i; lstGoto_SelectionChanged(lstReadingSearchResults, null); IsIndexMatched = true; break; } } }); //TaskEx.delay(1000); if (IsIndexMatched == true) stkPanelGoto.Visibility = Visibility.Collapsed; else //the index didn't match { MessagePrompt.ShowMessage("The test'" + ayaStr + "' does not exist.", "Warning!"); } Could anyone please tell me how can I use multi-threading with a "for" or "foreach" loop?

    Read the article

  • How to append html only if the div is empty in jQuery?

    - by johnnyb3000
    I have this code for displaying content for login and registration in my PHP file: <?php // LOGIN PART ?> <div class="login-part"></div> <?php // REGISTRATION PART ?> <div class="registration-part"></div> And this in my js file: $(document).ready( function() { // FOR REGISTRATION $('span.logreg.reg').click(function () { $('div.registration-part').append('<p>Registration</p>'); }); // FOR LOGIN $('span.logreg.log').click(function () { // insert html $('div.login-part').append('<p>Login</p>'); }); }); Now, everytime I click on a span it shows the text login or registration, according to which of the span was clicked. Thats OK, however I need to add it only once, so when the user click more times on the span it will be not adding more text. Remove() or empty() is not an option, as far as I know, because I need the information inside input boxes (there will be input boxes later for inserting user info) to stay there and not be deleted if the user click accidentally on the span again. It can however delete the html inside the div, if he clicks on another span. E.g. if span.log is active, after clicking on span.log nothing happens, but if he clicks on span.reg the html inside div.login-part will be removed and registration text will appear. How to do something like this?

    Read the article

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