• Web Development Questions That Don't Need Their Own Thread v2
    3,079 replies, posted
[QUOTE=twenty;32123732]Does anyone know how to close all divs that have been opened with slideDown() in jQuery? Or if it's not possible a way to do multiple statements in a single line? jQuery: [code] if ($("#History").is(":hidden")) {[/code] in PHP it would be something like [PHP] if($var = 2 || $var = 3){ [/PHP] (haven't worked with PHP in a while, may not be correct.[/QUOTE] Something like this? [code] $("div").each(function(){ if((this).css("display") = "none") { $(this).slideUp(); } }); [/code]
[QUOTE=twenty;32123732]Does anyone know how to close all divs that have been opened with slideDown() in jQuery? Or if it's not possible a way to do multiple statements in a single line? jQuery: [code] if ($("#History").is(":hidden")) {[/code] in PHP it would be something like [PHP] if($var = 2 || $var = 3){ [/PHP] (haven't worked with PHP in a while, may not be correct.[/QUOTE] It's exactly the same in javascript (or statement that is): [code] if( a == 1 || b == 2 ) { } [/code] But obviously if you need to check all div's that have slideDown you'll need to each them as R1Z3 said.
Does anyone have an idea of how I would make an annotation/announcement box like the one we have on Facepunch? It would be perfect for the website I'm doing for the Computer Association I'm a member of.
just make a div and style it like a text box adding borders and background colors. and add javascript stuff so you can close it and stuff.
Anyone know if WebMatrix is good for programming with PHP?
[QUOTE=Val67;32165841]Anyone know if WebMatrix is good for programming with PHP?[/QUOTE] It looks pretty, but it's basically a "web development for dummies" platform. It probably does fine as an IDE, but at that point you're better off with a PHP-centric IDE like phpStorm.
[QUOTE=twenty;32123732]Does anyone know how to close all divs that have been opened with slideDown() in jQuery? Or if it's not possible a way to do multiple statements in a single line? jQuery: [code] if ($("#History").is(":hidden")) {[/code] in PHP it would be something like [PHP] if($var = 2 || $var = 3){ [/PHP] (haven't worked with PHP in a while, may not be correct.[/QUOTE] [code] $('#a, #b, #c :hidden').XYZ();[/code] ??
Also, anyone ever used Lua for webdev? Or Groovy?
I have been working on a website for about a month but I recently decided to rewrite it because I didn't like my frontend or my backend. I am using CodeIgniter So there goes my question, I don't want to clutter my controller space so should I just make one Library where I put my functions and then just work with that?
[QUOTE=Val67;32166642]Also, anyone ever used Lua for webdev? Or Groovy?[/QUOTE] For Lua there's [url=http://www.keplerproject.org/]Kepler[/url], but while the language is more than capable, it's not commonly used for web development, so support is severely lacking on most fronts (help and documentation, third-party libraries, web hosts with ootb support, etc).
[QUOTE=StinkyJoe;32166776]For Lua there's [url=http://www.keplerproject.org/]Kepler[/url], but while the language is more than capable, it's not commonly used for web development, so support is severely lacking on most fronts (help and documentation, third-party libraries, web hosts with ootb support, etc).[/QUOTE] Thanks! I plan to host myself so webhosting is not a problem
You think you're going to write a website in Lua?
[QUOTE=Lequinx;32167193]You think you're going to write a website in Lua?[/QUOTE] ...and the problem is?
It's piss easy with mod_lua on Apache, the Kelper project has some good stuff too. The problem is the lack of support for web-based things, you can't really make anything too complicated as a result, which is a shame because Lua is my favorite language. And it competes with compiled languages for speed despite the fact it's not compiled (utilizing LuaJIT of course, so it's sort-of compiled).
[code] <html> <head> <script type="text/javascript"> function add(number) { frm = document.frmOne.txtDisplay frm.value = frm.value + number } </script> </head> <body> <h1>Click to add one.</h1> <input id="frmOne" type="textbox" value="0" /> <button type="button" onclick=add(1)>Add</button> </body> </html> [/code] I have no idea why this code wont work. Any tips? I want it to add one every time the user clicks the button.
[QUOTE=toaster468;32168648][code] <html> <head> <script type="text/javascript"> function add(number) { frm = document.frmOne.txtDisplay frm.value = frm.value + number } </script> </head> <body> <h1>Click to add one.</h1> <input id="frmOne" type="textbox" value="0" /> <button type="button" onclick=add(1)>Display Date</button> </body> </html> [/code] I have no idea why this code wont work. Any tips? I want it to add one every time the user clicks the button.[/QUOTE] Put quotes around it.
[QUOTE=commander204;32168695]Put quotes around it.[/QUOTE] What do you mean, it? EDIT: I tried putting quotes around add(1), but that didn't work.
[QUOTE=toaster468;32168717]What do you mean, it? EDIT: I tried putting quotes around add(1), but that didn't work.[/QUOTE] [code][highlight]document.frmOne is undefined[/highlight][/code] Here: [code]<html> <head> </head> <body> <h1>Click to add one.</h1> <input id="frmOne" type="textbox" value="0" /> <button type="button" onclick=add(1)>Display Date</button> <script type="text/javascript"> function add(number) { frm = document.getElementById('frmOne'); frm.value = frm.value + number } </script> </body> </html>[/code] [url=http://getfirebug.com/]Firebug[/url] for Firefox, and/or Chrome's developer tools will save you plenty of headaches.
[QUOTE=StinkyJoe;32168835][code][highlight]document.frmOne is undefined[/highlight][/code] Here: [code]<html> <head> </head> <body> <h1>Click to add one.</h1> <input id="frmOne" type="textbox" value="0" /> <button type="button" onclick=add(1)>Display Date</button> <script type="text/javascript"> function add(number) { frm = document.getElementById('frmOne'); frm.value = frm.value + number } </script> </body> </html>[/code][/QUOTE] Fuck, I need to get firebug, but I am on Chrome any suggestions for console like it? And thanks Joe.
[QUOTE=toaster468;32168865]Fuck, I need to get firebug, but I am on Chrome any suggestions for console like it? And thanks Joe.[/QUOTE] On Chrome: [img]http://img1.uploadscreenshot.com/images/orig/9/24916402539-orig.png[/img] and then: [img]http://img1.uploadscreenshot.com/images/orig/9/24916410890-orig.png[/img] Good luck! Let us know if you have any more issues.
Sorry, but how can I make it update the amount on a paragraph tag? I forgot a lot since I last did JavaScript.
Why is Chrome fucking up my font? I'm using version 13.0.782.220 [url]http://speedwaymotorcycles.co.uk/finance[/url] [img]http://dl.dropbox.com/u/386727/ScrnCap/ChromeFontSpacing.png[/img]
[QUOTE=jaybuz;32169193]Why is Chrome fucking up my font? I'm using version 13.0.782.220 [url]http://speedwaymotorcycles.co.uk/finance[/url] [img]http://dl.dropbox.com/u/386727/ScrnCap/ChromeFontSpacing.png[/img][/QUOTE] It's looking fine on my end, also [B]13.0.782.220 m[/B]: [img]http://img1.uploadscreenshot.com/images/orig/9/24917061266-orig.png[/img]
Heh, after I reopened Chrome it looks fine. Weirddd :v: I think it may have something to do with the Inspector screwing up. [editline]7th September 2011[/editline] Thanks for checking anyway. [editline]7th September 2011[/editline] Chrome has pretty bad AA on larger fonts.
[QUOTE=StinkyJoe;32169412]It's looking fine on my end, also [B]13.0.782.220 m[/B]: [img]http://img1.uploadscreenshot.com/images/orig/9/24917061266-orig.png[/img][/QUOTE] nice theme. What is it called. I remember i had it somewhere, but i lost it.
[QUOTE=zzlawlzz;32169811]nice theme. What is it called. I remember i had it somewhere, but i lost it.[/QUOTE] It's [url=http://browse.deviantart.com/?qh=&section=&q=soft7#/d2o7oz5]Soft7 2.0[/url].
[QUOTE=StinkyJoe;32169842]It's [url=http://browse.deviantart.com/?qh=§ion=&q=soft7#/d2o7oz5]Soft7 2.0[/url].[/QUOTE] oh, it's for windows 7. What a shame.
First time ever in this section. Tell me if I'm doing something wrong. I have a website idea that is really good (I think it is), but I don't know what to do about it. Basically, it would be a homepage with everything you need on it. How do I carry out this? I don't think it's something that HTML could do but what other languages are there for web dev.?
[QUOTE=Raptor;32170793]First time ever in this section. Tell me if I'm doing something wrong. I have a website idea that is really good (I think it is), but I don't know what to do about it. Basically, it would be a homepage with everything you need on it. How do I carry out this? I don't think it's something that HTML could do but what other languages are there for web dev.?[/QUOTE]"everything you need"? Sounds like iGoogle to me.
[QUOTE=Octave;32170852]"everything you need"? Sounds like iGoogle to me.[/QUOTE] Yeah it's a similar idea. But it would be a little more customizable. Window size and position would be whatever you'd like it to be. Plus, I don't really like the style of it. Feels kinda cluttered in my opinion
Sorry, you need to Log In to post a reply to this thread.