Say I have some JavaScript code in script tags like this:

Say I have some JavaScript code in script tags like this:


"bubble": {
"distance": 400,
"size": 40,
"duration": 2,
"opacity": 8,
"speed": 3

In another piece in script tags I count the day of the month.

If I want to say, if (day_of_week < 26):

then within bubble, change size to 50, how would I go about doing that?

Attached: whatthefuck.png (1198x659, 691K)

>>>stackoverflow

bubble.size = 50;

you can help a brotha out once in a while, maybe some day you'll be in need yourself.

And if that turns out to be the case he himself will turn to stackoverflow. Now go on and piss off.

it didn't work, wait let me

particlesJS('particles-js',

{
"particles": {
"number": {
"value": 80,
"density": {
"enable": true,
"value_area": 800
}

so how would I write some code to change for examples the particle number to 90 or something, bear in mind the whole of particlesJS is within script tags.

stackoverflow is a designated shitting street

example:

a = {
"particles": {
"number": {
"value": 80,
"density": {
"enable": true,
"value_area": 800
}
}
}
}


then:

a.particles.number.value = 90

and then call

particlesJS('particles-js', a)

what about when it's particlesJS( )

like that with a "dictionary" inside of it

that "woman" has many many masculine facial features

alternatively you can do this:

a = 90

particlesJS('particles-js',
{
"particles": {
"number": {
"value": a,
"density": {
"enable": true,
"value_area": 800
}
}
}
}

she does doesn't she? but for some reason I find her incredibly attractive.

I tried it but it didn't work, I don't really get what particlesJS is.


particlesJS('particles-js',

{
"particles": {
"number": {
"value": 80,
"density": {
"enable": true,
"value_area": 800
}
},

the above is within SCRIPT TAGS

>I tried it but it didn't work

open the javascript console.

what does it say?

here's what I did.

I set a = 90 initially, and that worked like a charm.

Then later in the exact same script, I set the condition, if day

Of course. OP is a faggot. You are the rule, not the exception.

Ok so, I found that changing the value of a after its been defined first at the top has no effect.

This would suggest that I have to change something inside particlesJS.


How do I do that? This is the part thats been confusing me all along

I have no idea WTF particlesJS actually is.

pls help

OP is why web developers have such a terrible name.

Read the documentation for particlejs.

nvm I got it working

NEW PROBLEM:


This should be easy, how to I get some text from another document to appear in javascript

say meme.html simply says "fuck you"

I want to call meme.html in my javascript and I want the exact contents of meme.html

I pm'd you the solution, have a nice day :)

Fuck that bitch, where's my Nancy?

most js plugins need to be reinit with new values. most likely those values are stored on init.

t. poo

You need to make an xmlhttprequest.

That's what work does to women you retard

And this isn't now fuck off

fetch('meme.html')
.then(response => {
//do something with the response body
})