how to trigger onmouseup handler from javascript
i have my button
<input id="x" onmouseup="doStuff()">
and i want to trigger
document.getElementById("x").onmouseup();?????
I'm trying to refractor my code. I've got 3 components but they are all in one module. Now I'd like to have one module for each component. They have a hierarchy meaning I have a parent navigation , then a sub navigation that depends on the parent clicked and then I have section which depend on sub navigation.
Where should my even listeners be.
For example "on click" event on the main navigation. That then display corresponding sub navigation. Should that "on click" event be in the sub nav module? I feel like it should... but I have no idea
@Paran0a without seeing your code, my idea is that you'd have a parent navigation module and a sub navigation module, both of which holding an instance of a third event bus module responsible for receiving and triggering events
Hey! Do you know, that you can make for __any__ engineering problem a "brute-force" algorithm, which theoretically finds its solution, describe that algorithm as a logical scheme and then you can use an AI agent to make that logical scheme easier to compute, by simplifying unnecessary computation steps, input variables, etc.
Could you name people, who work on something like that? Thanks!
@EugeneZavidovsky Welcome to the JavaScript chat! Please review the room rules. Pleasedon't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
@Ryan Say, find a design of a molecular nanofactory which will work in a given physics simulator. That problem can be described as a computing "brute-force" logical scheme, which then can be simplified by an AI agent.
Man yesterday I saw a shopping cart that can distinguish between perfect plastic replica of 1Euro and real Euro. I'm pretty sure AI can solve your molecular mumbojumbo.
@Ryan Yeah, it may be so. State-of-the-art theorem provers based on Neural Networks are still not impressive. I just wonder why no one seems to use Neural Graphs instead...
And don't forget about a lil boy with 90 PFLOPS ; )
I don't know , I'm at work whole day and one day she said she was reading this chat and felt something and she thought that's the baby . We went to the doctors and whaddayaknow shes pregnant. It's pretty weird but I believe her.
I would appreciate any help with this.
This has been edited to more clearly describe how the array should be evaluated.
I am trying to figure out how I can compare all elements of a multidimensional array to determine if the elements comprise a true set.
Criteria
I won't know how big t...
uh.... how do i create a class with a subclass in JS?
in c# i'd do this:
public List<GridSnapClass> GridSnapList { get; set; }
public class GridSnapClass
{
public int ID { get; set; }
public string EID { get; set; }
public string X { get; set; }
public string Y { get; set; }
}
When a function is a property, you must still put () afterward to call it. Running alert or console.log on a function first converts the code to a string, and if that isn't what is desired, then use alert(someobj.myFunction()) note it has () to call the function.
Yeah It works, only thing I'm annoyed is how the syntax looks , having stuff like mainNav.activeNav() instead of mainNav.activeNav looks iffy . I am though worried about support for gettters
Well, there's a tool put out by Facebook called "babel", that transforms ES6 code back to earlier JS so everyone can run it. Some projects use this in their build so that devs can write code using the latest syntax, and don't have to look at the uglier equivalent code that actually runs.
Yeah, something like that. I used to have a posting about how to set this up, but it may not be current. Here it is: stackoverflow.com/a/38278126/103081