Closed qwo closed 10 years ago
The 757rb site uses API Key Signatures. Please feel free to check out the two files that use different API's.
https://github.com/757rb/757rb.org-jekyll/blob/master/_assets/javascripts/home/meetup_event.js.coffee https://github.com/757rb/757rb.org-jekyll/blob/master/_assets/javascripts/home/meetup_players.js.coffee
Can you use cdnjs to load jquery? There's no reason to keep it in the repo
sure no problem.
Can we please use $('<li>').attr( ...
instead of html string concatenation? I don't think our need for this is so pressing that we should to introduce such hackery. Going through jQuery will also ensure cross-browser happiness.
pre v2 is crossbrowser happiness. v2 was gutted of most
On Sat, Jun 14, 2014 at 10:05 PM, Travis Webb notifications@github.com wrote:
Can we please use $(' ').attr( ... instead of string concatenation? I don't think our need for this is so pressing that we should to introduce hackery. Going through jQuery will also ensure cross-browser happiness.
— Reply to this email directly or view it on GitHub https://github.com/norfolkjs/norfolkjs.github.io/pull/46#issuecomment-46104732 .
J. Albert Bowden II
jalbertbowden@gmail.com
Can we please use
$('<li>').attr( ...
instead
Bike shed time! You could totally do this too: $('<img>', {src: 'foo.png'})
which passes all attributes as an object/hash.
ah cool @metaskills you mean something like
var foo =$('<a>', {
href: '/images/ninjacat_150.png',
img:{
src:'/images/ninjacat_150.png'
}})
Sure, but that nested img
would need to be a jQuery object too. For example, as seen on https://coderwall.com/p/evmqoa
var item = {href: 'http://metaskills.net', title: 'MetaSkills.net'};
$('<li>', {
html: $('<a>', {
href: item.href,
text: item.title
})
});
<li>
<a href="http://metaskills.net">MetaSkills.net</a>
</li>
thanks @metaskills this did the trick
$.each( json.results[0].sponsors, function( key, val ) {
//items.push( "<li id='" + key + "'>" + val + "</li>" );
if(!val.hasOwnProperty("redeem")){
var element = $('<a>', {
href: val.url,
html: $('<img>', {
src: val.image_url
})
});
$("#sponsors").append(element);
}
});
Bike shed time! You could totally do this too: $('
', {src: 'foo.png'}) which passes all attributes as an object/hash.
+1
@stanzheng You desperately need to install a linting program. Please do not submit any more code that is not tabbed and spaced consistently.
@stanzheng This isn't from Atom, right? Just pasted in from some online editor?
my atom linting setting must be pretty light, i'm going to find a tigher jslintrc setting add it to the gitignore.
:) you have a favorite one?
https://github.com/Joezo/atom-jshint
In settings, you can set soft tabs and the default tabs (2)
Not sure, I use the default jshint settings. I'm not sure how not tabbing your code correctly in the first place saves you any time or energy.
what is tabbing correctly? is that defined somewhere for reference?
On Saturday, June 14, 2014, Travis Webb notifications@github.com wrote:
I just use the default jshint settings. I'm not sure how not just tabbing your code correctly in the first place saves you any time or energy.
— Reply to this email directly or view it on GitHub https://github.com/norfolkjs/norfolkjs.github.io/pull/46#issuecomment-46106175 .
J. Albert Bowden II
jalbertbowden@gmail.com
The tabs in the code weren't actually lining up consistently. Looks like a @stanzheng copy/ paste job error, but the Atom Hint plugin should catch that. I can show you my settings on Tuesday.
whats tuesday
On Sunday, June 15, 2014, Linda Nichols notifications@github.com wrote:
The tabs in the code weren't actually lining up consistently. Looks like a @stanzheng https://github.com/stanzheng copy/ paste job error, but the Atom Hint plugin should catch that. I can show you my settings on Tuesday.
— Reply to this email directly or view it on GitHub https://github.com/norfolkjs/norfolkjs.github.io/pull/46#issuecomment-46113335 .
J. Albert Bowden II
jalbertbowden@gmail.com
When I'll see Stanley at work next. I guess I need to stop commenting to Stanley publicly like he's my intern :)
@jalbertbowden http://en.wikipedia.org/wiki/Indent_style#Styles
K+R and 1TBS are used for the C language family, of which Javascript is a member. In general, any of these styles would be preferable over what was previously in this PR.
cool, just curious which you (and group) prescribed to. thanks.
On Sun, Jun 15, 2014 at 12:47 PM, Travis Webb notifications@github.com wrote:
@jalbertbowden https://github.com/jalbertbowden http://en.wikipedia.org/wiki/Indent_style#Styles
K+R and 1TBS are used for the C language family, of which Javascript is a member. In general, any of these styles would be preferable over what was previously in this PR.
— Reply to this email directly or view it on GitHub https://github.com/norfolkjs/norfolkjs.github.io/pull/46#issuecomment-46120811 .
J. Albert Bowden II
jalbertbowden@gmail.com
Yea, I'm not going to reject any consistent style unless it's obscure or hard to read. I will always reject haphazard nonsense.
Not Working yet,
adding for meetup sponsor logo and events.