Hi everyone,
I'm using jQuery replaceWith to update information of my website. Div elements which are returned are small. The function is called after 5 minutes. When I focus on browser, replaceWith function will run but my browser is not smooth and sometime can crash. Which plugin or solution can I use to resolve the problem ?
I used: $...
this is the demo code :
function a(){
this.a='aaa'
}
var aa=new a
how to clear the aa object from the memory
thanks
...
So I have an array with variables with values from textfields
var data = [name, address, city, country];
then the command
transaction.executeSql("INSERT INTO Customer(name, address, city, country) VALUES (?, ?, ?, ?)", [data[0], data[1], data[2], data[3]]);
It works fine but in the real database I have about 50 fields and if I nee...
My current style of programming is OO javascript using the Class.extend function by John Resig: http://ejohn.org/blog/simple-javascript-inheritance/
This has been fine but I find myself writing numerous setters and getters that only get used on init. Also, it seems to lead to memory leaks in IE when storing instances of these objects i...
I'm trying to do the following:
//Code under test
function Foo() {
this.do_something_interesting = function() {
var dependency = new CanYouMockMe();
if(dependency.i_want_stubbed() === true) {
//do stuff based on condition
} else {
//do stuff if false
}
}
}
//Test Code
describe("Foo", function () {
it("...
I am wondering why:
$.post("remote.php",
{'f':a_searchtype, 'partial':value},
function(data){
$("#result").html(data);
});
worksfine. but using a variable such as:
ajax_arg = {'f':a_searchtype, 'partial':value};
$.post("remote.php",
ajax_arg,
function(data){
$("#result").html(data);
});
causes javas...
Hi,
I have a web app that has a list of user comments. I want extra options for these comments (vote, reply, etc..) to appear only when the comment itself is mouseover-ed
The best example of what I am looking for would be a youtube video:
http://www.youtube.com/watch?v=s2VzLn6DMCE&ob=av3e
When you go to the comments the options...
<ul id='myid'>
<li id='1'> my text 1 <p id='1' >inside p1 clicked</p></li>
<li id='2'> my text 2 <p id='1' >inside p2 clicked</p></li>
<li id='3'> my text 3 <p id='1' >inside p3 clicked</p></li>
<li id='4'> my text 4 <p id='1' >inside p4 clicked</p></li>
<li id='5'> my text 5 <p id='1' >inside p5 clicked</p></li>
</ul>
...
Are there any pitfalls to code like this?
var Foo = function() {
this.bar = function() { return 'bar'; };
};
var f = new Foo();
f[0] = 'hi';
f[1] = 'there';
Note that I'm creating a new function object with some misc properties, and then I'm treating the object like an array. Also how are the array values being stored in the obje...
I am using nyroModal to display a lightbox when an image in thumbnail gallery is clicked on.
The thumbnail gallery is created from AJAX which sets each thumbnail to link to a javascript function passing 3 URLs. One for the large version or the image, one for the next image in the gallery and one for the previous image.
This is the jav...
Hello everyone. I would like to ask you all about the Unity framework and programming. Unity supports three different languages; Boo, C# and JavaScript. Say you were new to programming and developing on OS X.
What is the best language to learn and use alongside Unity to create games?
...
Hi guys,
I've developed a jQTouch app ( http://bit.ly/9uE1i0 ), with iScroll
integration ( http://bit.ly/9KsKz3 ), using the native tabbar (
http://bit.ly/ag3H6b ).
All works great in PhoneGap except that iScroll sticks when the swipe
motion goes over the uicontrols tabbar. See video: http://screenr.com/AcD
Is there a way to inc...
I am using following jquery method
$('form').submit(function(){
$('#universities_selected option').each(function(i) {
$(this).attr("selected", "selected");
});
});
when we submit form this method is called and it checks all the entries in multi select list "universities_selected" and set them as selected.......
Apple changed their home page with a fade in effect that loads fast. Is this HTML 5 or jQuery?
Does anyone know how they did this?
...
Possible Duplicate:
Call ASP.NET Function From Javascript?
this question is asked by interviewer. can anybody tell me that is it possible? if yes then how.
...
I have the following function to display the infowindow with tabs on google map using GInfoWindowTab ,the default infowindow is displayed with two tabs ,my question is how can i change the size ,background color and styles of the infowindow and can i add videos into one of the tab in infowindow.
function createMarker(point, name, addre...
The following small snippet of code cannot be changed once deployed (it's in an RIA) so everything must be loaded via a bootstrapper.js file:
<div id="someDivID"></div>
<script type="text/javascript" src="bootstrapper.js"></script>
What's the best way to load up all the js, css, and markup? Is there a better (cleaner, faster, crisper...
Background:
We've written some client-side javascript that we now have to move to a server for performance reasons. What we'd like to do is move the current javascript right over to a server rather than re-writing in a different language. It will need to access an Oracle database to get data.
Question:
So, what are some recommended i...
Sometimes i'm facing problems, trying to get sizes of an HTML element in question.
I'm tracing JavaScript code and see, that width and height of this element are returned as 0.
When i do the same piece of code in browser's console, correct sizes are returned.
Example code, that demonstrates this problem is following:
<!DOCTYPE html>
...
in Google Chrome 7 Folder drag and drop has been added click-here, Can any one show demo code how is that possible?
...