Skip to content

Author: admin@master

Show div when on scroll and class called

I have a one page app that has 2 sidenavs (nav1 and nav2) and 2 different contents of div. Now I want to do is when I scroll down and get to the point where class=”content2″ is there, id=&…

Javascript generate unique number based on string

Lets say I have a string var input = “Foo” and I need a 100% unique number from that string, I tried something like But this generates duplicates like W8M and YSM and both return the id of 149. Is there an algorithm for something like this? Answer You want a hash function. Hash functions are gener…

How to catch form submit with Backbone.js

When I test and click my apply button after I put in data in my input fields, I get a file not found error. The Login button is a dummy button with no functionality to it. I want to only display an alert box that says “You logged in as (user name here) Succesfully!!!” after apply is clicked. Answe…

three.js Cube Geometry – how to update parameters?

Possibly dumb question but here goes. Three.js geometries have ‘parameter’ feilds associated with them, see the box geometry here… box Geometry parameters I am trying to update these parameters like this… But of course, the geometry remains unchanged. Is there a way of updating the geo…