• Web Development - WAYWO - #8
    5,514 replies, posted
p.s. you can use css3 transitions the animation is kind of laggy on my computer because it uses javascript [editline]28th July 2013[/editline] i made a pure CSS dropdown menu: [url]http://jsfiddle.net/qwook/UeSK9/[/url] [editline]28 July 2013[/editline] here's my hacky and crappy attempt at a pure CSS carousel: [url]http://jsfiddle.net/qwook/tbH9v/2/[/url] It's glitchy on firefox and works better on either Chrome or Safari. btw its hella fun trying to make pure css stuff. forces you to think a different way
sucks that there are no 2d arrays in javascript, trying to do a rating collector but i guess it doesn't work.
[QUOTE=Giraffen93;41623441]sucks that there are no 2d arrays in javascript, trying to do a rating collector but i guess it doesn't work.[/QUOTE] [ [...], [...], ... ] ?
[QUOTE=Darkwater124;41623462][ [...], [...], ... ] ?[/QUOTE] doesn't work, script stops [editline]28th July 2013[/editline] [code]var pageRatings = []; $(".postbitold").each(function(){ var userid = $(this).find(".username").attr("href").split("=")[1]; var postid = $(this).attr("id").split("_")[1]; var ratings = $(this).find(".rating_results"); pageRatings.push(postid); $(ratings).children("span").each(function(){ var rating = $(this).children("img").attr("alt"); var num = $(this).children("strong").html(); pageRatings[postid][rating] = num; }); }); allratings = JSON.stringify(pageRatings); [/code] I guess i'm too used to php, fuck this
[QUOTE=Giraffen93;41623474]doesn't work, script stops[/QUOTE] Then that's something else with your script. 2D arrays most definitely work in JS: [url]http://jsfiddle.net/eZkEb/[/url]
[QUOTE=Dragory;41623615]Then that's something else with your script. 2D arrays most definitely work in JS: [url]http://jsfiddle.net/eZkEb/[/url][/QUOTE] But how do i add stuff to it after i've created it? The PHP way doesn't work.
[QUOTE=Giraffen93;41623622]But how do i add stuff to it after i've created it? The PHP way doesn't work.[/QUOTE] [code]arr[arr.length]=[10,11,12];[/code] [editline]28th July 2013[/editline] Or you could define a specific key if you wanted to.
[QUOTE=Giraffen93;41623622]But how do i add stuff to it after i've created it? The PHP way doesn't work.[/QUOTE] What you're trying to do seems more fit for objects than arrays. Try: [code]var pageRatings = {}; $(".postbitold").each(function(){ var userid = $(this).find(".username").attr("href").split("=")[1]; var postid = $(this).attr("id").split("_")[1]; var ratings = $(this).find(".rating_results"); pageRatings[postid] = {}; $(ratings).children("span").each(function(){ var rating = $(this).children("img").attr("alt"); var num = $(this).children("strong").html(); pageRatings[postid][rating] = num; }); }); allratings = JSON.stringify(pageRatings); [/code] In PHP "arrays" aren't really arrays (from [url=http://php.net/manual/en/language.types.array.php]php.net[/url]: "An array in PHP is actually an ordered map. ") but can be used for similar purposes.
[QUOTE=AMD K6;41623649][code]arr[arr.length]=[10,11,12];[/code] [editline]28th July 2013[/editline] Or you could define a specific key if you wanted to.[/QUOTE] [code]pageRatings[postid][rating] = num;[/code] isn't that bascially it? because it doesn't work [editline]28th July 2013[/editline] [QUOTE=Dragory;41623657]What you're trying to do seems more fit for objects than arrays. Try: [code]var pageRatings = {}; $(".postbitold").each(function(){ var userid = $(this).find(".username").attr("href").split("=")[1]; var postid = $(this).attr("id").split("_")[1]; var ratings = $(this).find(".rating_results"); pageRatings[postid] = {}; $(ratings).children("span").each(function(){ var rating = $(this).children("img").attr("alt"); var num = $(this).children("strong").html(); pageRatings[postid][rating] = num; }); }); allratings = JSON.stringify(pageRatings); [/code][/QUOTE] yeah tried objects before but it didn't work, this did though, thanks
[QUOTE=Giraffen93;41623662][code]pageRatings[postid][rating] = num;[/code] isn't that bascially it? because it doesn't work[/QUOTE] Stupid question, but are postid and rating being interpreted as strings? Because that would fuck up selecting an item by key.
[QUOTE=AMD K6;41623695]Stupid question, but are postid and rating being interpreted as strings? Because that would fuck up selecting an item by key.[/QUOTE] It works now. It's pretty sad how bad my memory is, haven't worked on anything webdev related in the past few weeks and i've forgotten almost everything i've learned for the past 7 years. [editline]28th July 2013[/editline] [url]http://braxnet.org/fpr/[/url] Front-end done!
[T]https://dl.dropboxusercontent.com/u/27682432/images/marcopixelateuorg.png[/T] Love it, went better than excepted :D (Ignore the BF3 placeholder image :P)
Made this in under 24 hours [url]http://www.callamsgraphics.co.uk/motion/index.html[/url] This is what some other guy made: [url]http://www.motiongaming.tk[/url] Wanted a slider where it has like (reduced opacity)Image | Main Image | (reduced opacity)Image But I think the slider I have now does the job fine.
[url]http://new.waldorfumea.se/[/url] Made a lot of changes, almost finished. Though the submenu [I]needs[/I] to be positioned automatically, absolute just doesn't work since it's different in all browsers. How would i accomplish this?
I'm working on the web view portion of a project of mine, and this is what I got so far. [t]http://puu.sh/3OgDj.png[/t] The advanced tag doesn't have an icon because the cursor is over it.
lets rave [url]http://xapi.co.uk/x/[/url]
[QUOTE=BAZ;41642655]lets rave [url]http://xapi.co.uk/x/[/url][/QUOTE] Let's have a seizure*
I had to build a responsive website at work (don't have too much web dev experience) and I have no idea how you guys do it. I come from java and python land and building this responsive website just feels like the biggest hackfest. So much fine tweaking is needed it drives me nuts.
Anyone toy around with Fizzadar's Luawa? I keep getting the weirdest errors.
[QUOTE=Sean C;41643190]I had to build a responsive website at work (don't have too much web dev experience) and I have no idea how you guys do it. I come from java and python land and building this responsive website just feels like the biggest hackfest. So much fine tweaking is needed it drives me nuts.[/QUOTE] Frameworks. Bootstrap 3, especially, would be a great fit for doing a responsive site.
[QUOTE=andersonmat;41643899]Frameworks. Bootstrap 3, especially, would be a great fit for doing a responsive site.[/QUOTE] or Foundation.
[QUOTE=BAZ;41642655]lets rave [url]http://xapi.co.uk/x/[/url][/QUOTE] Dang i looked for something like this but with just a strobe for the rave party i hosted last year
[t]http://i.imgur.com/nMtGlT2.png[/t] WHOIS is such a shitty inconsistent protocol.
Lots of the protocols in use today seem to be shitty
The idiocy of the email protocols still astound me.
[t]http://i.imgur.com/bc6c7F3.png[/t] [t]http://i.imgur.com/VdT22Uj.png[/t] [t]http://i.imgur.com/wnwY9w2.jpg[/t] Spent a couple of hours writing a Terminal and File Manager to test out the capabilities of my platform. Terminal uses some code I stole from [URL="https://github.com/chjj/tty.js/"]tty.js[/URL]. The file manager an also view text as well as render markdown and csv files.
That looks neat. What is the website going to be?
Lets you manage, scan, and monitor servers. So you can do things like get the WHOIS data for a website every X days and notify you if there are any changes, or get it to send you an email/SMS whenever a website goes down, scan servers for known vulnerabilities, alert you of anomalous activity on a network such as additional suspicious hops added to a traceroute, that sort of thing. There's so many features that I want to implement that it's kind of grown into this massive project that consumes all my free-time.
[QUOTE=Jelly;41647631]Lets you manage, scan, and monitor servers. So you can do things like get the WHOIS data for a website every X days and notify you if there are any changes, or get it to send you an email/SMS whenever a website goes down, scan servers for known vulnerabilities, alert you of anomalous activity on a network such as additional suspicious hops added to a traceroute, that sort of thing. There's so many features that I want to implement that it's kind of grown into this massive project that consumes all my free-time.[/QUOTE] I'd be very interested in playing with that once you are finished.
First web development I've done in a long time, and the first time I've really used JavaScript on a webpage much. I know it doesn't work without JavaScript but that would also break CodeMirror and most of the site anyway, so I didn't really see it as too much of an issue. The favicon is just a place-holder made with the android launcher icon generator because I'm lazy. [url]http://paste.curlybracket.co.uk/[/url] An example paste: [url]http://paste.curlybracket.co.uk/NjE0MWI4[/url]
Sorry, you need to Log In to post a reply to this thread.