« first day (3761 days earlier)      last day (1410 days later) » 

10:46
Hello, I have a problem can anyone help me?
@KhwajaHussamQuasmi Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
4 hours later…
14:28
cutt.ly/vkodxJK @JBis why this no throw error?
nvm I am dumb :D
didn't notice the glaring error
hello TylerH
It still breaks though it shouldn't allow a number stream
 
1 hour later…
15:40
There we go :) shorturl.at/cetzX
I don't understand why Streamable<never, SharedDataType> can satisfy Streamable<SharedDataType, unknown> at line 40
wouldn't it fail?
16:27
Hey
@LazaroYT Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
can someone help
1
Q: Automatic drag and drop with a click

Lazaro YTI'm looking for an automatical drag and dropper. I want the script to work like this. So first, when I click anywhere on the screen, it get's it's coordinates, then drag and drops and element with the ID of "ball". I know this post will get LOTS of down votes because it's confusing, but this is r...

17:06
o/
What is wrong with this JS? I can't get it to appendTo properly, but it is still appending
17:25
@bigchungus i think i have an idea of what you're trying to do, but could you add some comments around your appendTo function to explain the desired output a bit better
@teachtyler yes
I checked my JS and everything should be fine, but it stopped appending and I checked through JSHint to ensure the console throws no more errors jsfiddle.net/myu3jwcn/3
18:18
@VLAZ
 
2 hours later…
19:50
$('<li>',{text:obj.Team}).appendTo(ul);
So I can append Team object to a <ul> but it populates to every ul. Is there any way that I can append to a <ul> by a specific ID? I tried and couldn't figure anything out quite
Is "ul" a variable? If so, what's the value?
var ul = $('ul');
Ok, so what's the ID of the list you want to append to?
https://jsfiddle.net/myu3jwcn/5/

Here is my most updated fiddle. It keeps appending the Team name to every single <ul> in my <div id="report-summary">
I want to append to
<li class='active'>
            <ul id='teamname'></ul></li>
How do you get an element by id in jQuery?
19:58
1467
Q: How can I get the ID of an element using jQuery?

fearofawhackplanet<div id="test"></div> <script> $(document).ready(function() { alert($('#test').id); }); </script> Why doesn't the above work, and how should I do this?

That's interesting - but api.jquery.com/id-selector
You want to append those teams to a list with the ID of "teamname"
$('ul') returns all ul elements, not just the one you want. So you'd have to use the id...
20:21
Didn't work
The example makes sense, I am just having difficulty understanding how to apply it to a JSON Array
Laugh all you want dood
i mean
What ID did you expect it to append to?
performing an action targeted at an element with a specific id is basics
teamname. I have tried so many different things before coming here and even if I specified what the ID was it still would not append anything. I went back to the start where you see the JS is what I have now because atleast its actually pushing something through
var ul = $('#teamname');
20:32
Ive done that. All it does is append the three team names to that UL
I created a
var ul1 = $('#task');
right
your description of your problem states you wanted it appended to that UL
$.each(data,function(i,obj) {
    $('<li>',{text:obj.Team}).appendTo(ul);
    $('<li>',{text:obj.Task}).appendTo(ul1);
});
@bigchungus Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. You have 25 seconds to edit and format your message properly before it will be removed. Please separate code blocks from your actual question. Put your question in 1 message and then your code in a 2nd and format it.
I need to post the data under the corresponding subheadings, and the first is Tasks, so I tried that and nothing but the teamnames append
I'm just thinking it's a good thing you're not using jQuery with ColdFusion right now
20:33
i mean..
Nvm
Kevin I was a letter off on the object name
i use jquery with coldfusion
well, have used*
i don't use jquery on new projects
I try not to use jQuery if I don't have to I prefer vanilla JS
Me too, I'm just saying throwing $('##task') into the mix would be even more confusing
just don't put javascript into your coldfusion files
they belong in .js files
20:36
If I wanted to rewrite everything from before I started working here, I'd do that
For now, I just push to use Angular on the front end and CF on the back end
It appends the Tasks of course all three under the subheading when I need them seperated by team, but once I added the deliverables it does not append anything more than the Tasks
20:49
Instead of jQuery how about something like this instead
Where data is my JSON Array
function onSuccess(data) {
     var listContent = [];

     for (var i = 0; i < data.length; i++) {
         listContent += '<li>';
         listContent += '<ul>' + data[i].Team  + '</ul>';
         listContent += '<ul>' + data[i].Tasks + '</ul>';
         listContent += '<ul>' + data[i].Deliverables + '</ul>';
         listContent += '<ul>' + data[i].Actions + '</ul>';
         listContent += '<ul>' + data[i].Billable + '</ul>';
         listContent += '<ul>' + data[i].NonBillable + '</ul>';
         listContent += '</li>';
@bigchungus Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. You have 25 seconds to edit and format your message properly before it will be removed. Please separate code blocks from your actual question. Put your question in 1 message and then your code in a 2nd and format it.
For posting large code blocks, use a paste site like like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
That'd work, if that's what you're asking
that is what I expected, but nothing is appending
https://jsfiddle.net/wdgcey1x/

With 0 errors
Should have read what you wrote better - listContent is an array, no reason it can't be a string
Then you have to make sure onSuccess is called with the correct data
 
2 hours later…
22:54

« first day (3761 days earlier)      last day (1410 days later) »