I have a YouTube video embedded in my page. It is hidden (display:none). You need to click one of the video link buttons to display the video and play it. The links are defined like this:
<a href="javascript:play('xxxxxxxxxxx')">Video 1</a>
<a href="javascript:play('xxxxxxxxxxx')">Video 2</a>
xxxxxxxxx represent YouTube video IDs.
He...
I'm building a website with some touch events and need to know how to make my touch events* only work when only 1 finger is touching (*these events prevent default), but I want to disable these events and restore defaults when 2 fingers are touching (to allow zooming, and keep the 1 finger events from being confused by 2 fingers).
Examp...
Hello,
Im trying to get pixel collision in one of the games im working on.
It has to be a pixel collision on one row of pixels on the X axis.
One of the things I tryed was:
var imgData = context2D.getImageData(160, 0, 3, Height);
And Height is afcorse the canvas height.
But this gives me a Security error" code: "1000.
This only happe...
Hi!
I'm using ExtJS (html/css) and I've got a question regarding Layout. Example:
|--------|
| |
| |
| |
| |
| |
|--------|
| |
| |
|--------|
The combined height (they don't have any padding, margin etc.) is 100% of it's parent container. Preferably, it's two panels somehow stacked on...
Hello, I'm wondering if anyone has had any experience modifying print settings via a web page. My overall goal would be to setup a print button on a web page
<a href="javascript:window.print()">Print This Page</a>
And at the same time modify the users print settings to print the page from a landscape view. Input on if this is even po...
I'm running mediawiki on an apache on a regular pc running vista (don't know the specific specs, but a regular pc, one year old, nothing special).
Edit: I'm guessing something like duo core 2 2 giga hertz processor, broadband connection (500 kb/s at least) and most of the time the requests will be sent through LAN (but sometimes through...
Hi,
What's the difference between these functions? Thanks for reply!
Function #1
var myQuery = (function() {
(...)
})();
Function #2
var myQuery = (function() {
(...)
});
...
Hi, I'm trying to perform a simple replace(); method in JavaScript where I'd like to remove every class from an HTML element except a specific one, how can I do it?
I tried this without success:
<div id="my_div" class="hello letsgo baby is_checked cool">Gordon Freeman</div>
<script>
$(document).ready(function () {
alert ($(#my_div...
Hi,
I know that this is a popular topic, but I've yet to find an answer that's completely comprehensive.
I'm trying to create a simple way for our 'customers' to place a Google Map on their website, which plots the position of our customers (or a subset thereof) on the map. The customers are in a MySQL database which is turned into XML...
I have taken over development of a website that integrates with Netsuite. The main way that it seems to use to get information from Netsuite about the current session (ie cart details, etc) is through the use of Javascripts. For example
http://shopping.netsuite.com/app/site/query/getcartitemcount.nl?c=xxxxxxx
gets the number of item...
This html:
<span id="mySpan"><img src="images/picture.png" alt="Some nice alt text" />
Link text</span>
This javascript takes the span containing the image and text, then makes it clickable:
spanVar = document.getElementById("mySpan");
spanVar.addEventListener("click", myEvent, false);
function myEvent(e){
var obj = e.target;
}
...
I'm planning on recreating some fo the iPhone form elements in HTML/CSS but I'm assuming this already exists. I tried googling it but didn't find anything. Anybody seem something like this already in existence?
...
I am trying to build out a gallery of photo items in javascript from facebook. The gallery is presented in a table with 5 images in each row. Every time I try to add something on to the outtable variable it empties
my code-
function getImages(){
var $outTable ='';
FB.api('/me', function(response) {
...
Hello,
I am trying to build a filterable listing of Resumes for a Club website that I work on. My goal is to be able to a all the resumes (in PDF) in a folder on the web server. I would Then like to offer the option for a user to generate a listing of Names with associated Link to the PDF document Like
"Name Resume Li...
with javascript(Jquery).
Searched online, seems like it's not possible. So far I have something like:
$("#textAreaId").bind('paste', function (e) {
alert('pasting text!!!!');
var data = $("#taData").val();
alert(data);
});
but the data is empty at this stage...is there a way to capture the pasted inpu...
I have a script that runs 95% of the time perfectly but the other 5% of the time the buttons contents are missing. The script is run on every page and turns every div with the class 'button' into a button.
var button_img = 'button-'+colour+'-'+size;
var butt_id = $(this).text().toLowerCase().replace(/ /g,'_');
var placehold...
I'm working on a project that integrates OpenLayers and Qooxdoo...so far I'm having lots of success. But now I want to be able to place qooxdoo widgets in an OpenLayers popup (FramedCloud in this case) and something weird is happening--the button won't click!
The hover events seem to be working, and I've determined that qx.event.handler...
I am loading the following javascript files from a CDN. Is there any way I can check if these have been loaded correctly and if not, load them from a local folder?
http://ajax.microsoft.com/ajax/jQuery/jquery-1.4.2.min.js
http://ajax.microsoft.com/ajax/jquery.ui/1.8.5/jquery-ui.min.js
http://ajax.microsoft.com/ajax/jquery.validate/1.7/j...
Hi,
I have the following seems to work in Internet Explorer but not Chrome. Can anyone please explain why, and what I should do to correct it.
<iframe id="confirmed_list" src="./meets/confirmed.php?meet_id=$1" scrolling="no" width="80%" onload="document.getElementById('confirmed_list').height = confirmed_list.document.body.scrollHeight...
Hi,
What's the best way to implement a new layer over JavaScript framework (jQuery, Prototype, ...)?
+------------+
| JavaScript |
+------------+
| jQuery |
+------------+
| MyLibrary |
+------------+
For example...
MyLibrary = MyLibrary || {};
MyLibrary.animate = function(params) {
// some code
}
MyLibrary.insert = functi...