« first day (185 days earlier)      last day (22 days later) » 

1:22 AM
-1
Q: Popup function written in jQuery

seahorsepipI wrote a jQuery function to show a popup that cab be draggable have multiple buttons etc: /*Popup function*/ function popup(config) { /*Default config*/ var buttons = config["buttons"]; var title = config["title"]; var html = config["html"]; var popupClassBase = "popup"; ...

 
 
4 hours later…
5:03 AM
1
Q: Angular Box Color Exercise

WinchenzoMagnificoI have completed an exercise where there are 4 different color boxes and 1 main box below them that is blank, when you click on one of the colored boxes, the main box changes to the color of the box you just clicked on. Also there should be working undo and redo buttons. Am I doing this the "Ang...

 
 
9 hours later…
1:45 PM
0
Q: Javascript BB-Code transformation

MarvI am doing a lot of stuff with Javascript and jQuery lately, but am not heading for clean code too much, as I am usually writing userscripts or small applications for myself. Recently, a community I am part of announced that it will change their supported BB-Codes, as the tabmenu BB-Code had a p...

 
 
1 hour later…
2:57 PM
0
Q: Should repeated variables be placed at the top of files?

janoChenExample: import Parse from 'parse' Parse.initialize('APP_ID', 'CLIENT_KEY') const post = {} post.create = json => { const Post = Parse.Object.extend('Post') const post = new Post() post.save(json).then(object => { console.log('yay! it worked', object) }) } post.find = () => { c...

 
 
1 hour later…
4:20 PM
0
Q: Redundant code in javascript function

AnhTuanI have a easy function but it have a redundant content. function showHide(link,divObject){ if($(window).width() > 992) { $( divObject ).slideToggle("slow",function(){ if ($(this).is(':visible')) { $(".component-header").removeClass( "arrow-down" ).addClass( "arrow-up" ); ...

 
 
6 hours later…
10:17 PM
0
Q: To-do app, as one monster function and as several smaller functions

RupI am learning to code by making a todo app in pure javascript. My first attempt can be seen here. It's all cosmetic, meaning it stores no information, generates no objects or arrays, though it was sure fun to learn how to manipulate DOM elements in pure javascript and building my first "program"...

 

« first day (185 days earlier)      last day (22 days later) »