I have the following javascript (with jQuery)
$(function() {
$(".btnDesc").click(function() {
$("#desc").slideToggle("slow");
$(this).toggleClass("active");
});
When I change .click(function() to .hover(funtion(), as expected, hovering over the link with class="btnDesc" shows the div instead of clicking it, however, I wou...
When I start a webkit browser instance and enter http://localhost, the result of $this.innerWidth() is right (I used jQuery).
But if I tried to refresh the page, the result of $this.innerWidth() will change, which is wrong. It seems no sense, as I think refresh is the same to start a new page loading.
And this only happens in webkit br...
I wrote simple custom validation on javascript based on this doc. I want it to display an alert if a select has been chosen on "Si" and the text fields are left blank. I don't get why it isn't displaying the message.
<html>
<head>
<link rel="stylesheet" type="text/css" media="screen" href="mistylesheet.css"/>
<script type ='text/ja...
I am trying to attempt my first Google Chrome Extension and have a question. My end goal is to be able to select a button which will perform the following:
Grab the current URL of the selected tab (Ex: www.google.com)
Open a new tab using the URL from step 1 and appending a query string to the end (Ex: www.google.com?filter=0)
Curre...
Hi guys,
I'm using AnythingSlider, but i get an error if i only have one slide item.
It gives me this error: 'base.$navLinks' is null or not an object.
The problem should be on line 149 in my jquery.anythingslider.js file. Which is the 3rd row in this bit of code:
if (base.options.buildNavigation){
base.$nav.find('.cur').removeClas...
Hello,
I'm improving the Google Maps API V2 integration in our web app and I'd like my main page to know when Google Maps has finished loading everything so I can then set some markers.
I notice there's a load() event but I can never seem to get it fire.
Here's the code I'm using
if( GBrowserIsCompatible() ) {
map = new...
I'm trying to get a basic function to execute when an HTML5 video reaches a specific second value. Currently I haven't had any luck and was hoping that I could get some help here. Here's the code I'm using thus far:
jQuery(function(){
jQuery("video").bind("timeupdate", function() {
if(this.currentTime == "6") { alert("six se...
How do I get the key that was pressed and, instead of returning the key code, put that key into an array?
For example, the user will press 'a'. Then, the code will put 'a' - not the keycode for the character - into an array.
Thanks in advance!
...
Hello,
I'm wondering what's the right way to code a chat application for thousands of users.
I'm just confused how will I be able to ping the server using AJAX every second or maybe less and check if there are new records in MySQL, etc with an acceptable amount of server(s) load.
I'm currently thinking about coding this using jQuery, ...
<script src="test.php"></script>
I want my test.php executed only when it's from <script>, is it possible?
...
Basically what I'm trying to accomplish is I want to check multiple dynamic forms on a page. Then if All textareas are empty OR have the default value, perform a function. Otherwise if any of them are not empty without the default value, cancel the function.
I know how to get the total count of the divs/forms or go through each one, sor...
Hello!
I am from Russia and I so need your help with google map v3!!!
I have the problem about geocoder! I have 20 address and my map shows me only 11 points!
I know about “delay” and “setTimeout”, but I don’t know how use it.
I found answer about it on this page - http://stackoverflow.com/questions/2899506/loading-city-state-from-sq...
Systematically updating src of IMG. Memory leak.
I am currently updating an image every x sec. A few ways I thought of doing this were as follows:
Take One:
var url ="...";
$('#ImageID').attr('src', url);
Now this works perfectly changes the image but causes a memory leak.
Take Two:
So it is creating DOM elements, so I attempted t...
Suppose I have the following HTML element:
<span id='kuku' class='lala bubu' value='xyz'>some text</span>
I know that .html() returns the inner part of the element, i.e. some text.
How could I get the whole element as string, containing <span>...</span>?
...
I currently have an array of places for a custom map that I am working on. I have been trying but cannot figure out how to add the 'click' popup box over a marker. I want the white box to display the name and have an option so that a person can choose 'get directions to here'. Does anyone know how I can achieve this with more then one ma...
is it possible to count the number of nodes in obout tree with specofic id.
...
I have a form. I want to add an event handler using jquery.
$("form").submit(function blah() {
$.post('ping-me-please.php', params, function (response) {
// only submit the form once this goes through!
});
}
How can I make this happen?
...
I have an html file index.html (in my server say abc.com) which accesses xyz.js like
<script type="text/javascript" src="xyz.js"></script>
The javascript file in turn accesses data.xml file.
The files index.html,xyz.js and data.xml are in the same folder.
How can I deny direct access to xyz.js and data.xml if a user types
abc.com/x...
HI,
i am using extjs 3.2.1 lib and iam new to extjs,
I have implemented combobox with remote with filtering option in the form, i have added forceSelection(true) property to combo for validate the text with store collection and allowblank(false) to combo for enable form save button .
My problem is forceSelection property validates...
YUI 3 just recently came out with touch event support for their slider, so that it can be manipulated using touch screens on mobile devices like iPhones and Android.
However, it might be a while before there is a dual thumb slider (aka "range slider") made within the YUI 3 framework. Possibly it will take longer than the deadline for my...