Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Questions must demonstrate a minimal understanding of the problem being solved. Tell us what you’ve tried to do, why it didn’t work, and how it should work. See also: Stack Overflow question checklist Closed 9 years ago. Improve this question I want to scroll the
Replace DOM with javascript and run new scripts
I am trying to replace the whole DOM on page load to do a no-js fallback for a user created knockout page. I have it replacing the DOM, but when I do the scripts included in the new document aren’t running. I was wondering if theres any way of forcing them to run. template contains the following encoded how can
What is the concept of Array.map?
I am having problems understanding the concept of Array.map. I did go to Mozilla and Tutorials Point, but they provided very limited info regarding this. This is how I am using Array.map. It is a little complex (a bit of d3.js involved; just ignore it) I do not understand exactly what this code is doing. I know its returning a
How do I get glyph outlines of a letter as bézier paths using JavaScript?
I want to retrieve the outline information of font glyphs as bézier paths in HTML5. This would allow me to randomize the outlines: In Cocoa, I would use appendBezierPathWithGlyph:inFont:. In Java, I would use TextLayout.getOutline(). How does this work in JavaScript? I discovered that Mozilla has mozPathText but I can’t get it to work. Answer Out of necessity I’ve created
Javascript redirect when clicking on a div with a certain id
Here is an example of what I need help with: http://www.arbutusroofing.com/roofing-services/ When the user clicks on “READ MORE” (under each subject or category) and the light grey box pops up with more information, I want it to automatically redirect to another page in 10 seconds. I know how to redirect to a different page when an actual link is clicked,
How to get the number of columns of a 2dimension array in javascript?
I have a 2 dimensional array albumPhotos[x][y]. The rows are photoalbums and the columns are links to photos. Now every photoalbum has a different number of photos , that means that every row in this array has a different number of columns. I am trying to check whats the length of every row in this array , that means how
Is it possible to make a squiggly line?
If I wanted to make a horizontal line, I would do this: If I wanted to make a vertical line, I would do this: A curved line is trickier, but possible using border-radius and wrapping the element: But I cannot even fathom how I could generate squiggly lines! Is this even remotely possible using only css (and javascript since it
ScrollTo function in AngularJS
I’m trying to get a quick nav to work correctly. It’s floating on the side. When they click on a link, it takes them to that ID on the page. I’m following this guide from Treehouse. This is what I have for the scrolling: I initially placed it before the </body>. But I seem to be running into a race
Removing leading whitespace from indented HTML source in pre/code tags
I currently have the following html within a pre-code block: It is indented within the html source for better structure within the document. How can I remove the leading whitespace? Through the use of javascript or is there a more simple method. Answer You may want to just change how it is output, but it is fairly simple to do
raphael js Pan functionality using raphael-pan-zoom
I found a plugin called raphael-pan-zoom that I use to zoom-in and zoom-out my raphaeljs elements in my paper, the zoom worked perfectly, but when I wanted to move the paper to the left, right, top or down I didn’t success. I found in the “raphael.pan-zoom.js” the pan function : I don’t know what is deltaX and deltaY and how