I’m writing a webpage that has a table with rows that slide open and closed. Initially, some rows are closed (display: none), and I want them to slide open. Setting the height and using overflow: hidden doesn’t work on table rows, so I’m changing the height of a div inside the table. This works. The only problem is that I
What information can we access from the client? [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago. Improve this question I’m trying to compile a list of information that is accessible via javascript such as: Geo-location IP address Browser software
image rotation script
So I have this script that will rotate images located in a directory, which works great. However, it requires a refresh of the page in order to rotate the image. Is there a way I can modify this to have it rotate the image when the image itself is clicked? Thanks in advance HTML: PHP: Answer Update: this is very
Using properties defined in the Options constructor within custom methods in mootools
I’m starting with the Mootools framework. Since I want the code to be reusable, I’m trying to do it with classes. In the code shown below, the intention is to draw a Map using Raphael framework for SVG. The code is working fine, but I’m having problems with the properties that are inside the Options object. }); Ok, like you
What are the proper use cases for process.nextTick in Node.js?
I have seen process.nextTick used in a few places and can’t quite tell what it’s being used for. https://github.com/andrewvc/node-paperboy/blob/master/lib/paperboy.js#L24 https://github.com/substack/…
Preloading a youtube embed
I want to have an embedded chromeless youtube video preload its video WITHOUT playing when the page loads. Right now I’m using an awkward “play then quickly pause” script which causes small problems (half-second audio leaks and fails quite a bit). For this seemingly simple functionality, is there a better/more elegant way to preload? Answer I had the same question
Get the first part of a url path
If I have a url like: http://localhost:53830/Organisations/1216/View I want to alert the first part of the url path in lowercase format e.g. ‘organisations’ So far I have: but it’s not working as intended. Can anyone help? Thanks Answer
How can I add new array elements at the beginning of an array in JavaScript?
I have a need to add or prepend elements at the beginning of an array. For example, if my array looks like below: And the response from my AJAX call is 34, I want the updated array to be like the following: Currently I am planning to do it like this: Is there a better way to do this? Does
Find element’s position in browser scroll
i need some help about finding elements position. im working on an e-book reader, also its all Html with css. All html sectioned page by page, and i have to find an element like this <span name=”Note” style=”background-color:rgb(255,255,204)”>Example</span> Everyone suggests code like this; but it does not work for me; I need element’s real position in scroll with JavaScript. Answer
How to do something before on submit?
i have a form which has a button that submits the form. I need to do something before submits happen. I tried doing onClick on that button but it happens after the submit. I can’t share the code but, generally, what should I do in jQuery or JS to handle this? Answer If you have a form as such: You