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 have an auto refresh script that refreshes a page every 3 seconds. The page it refreshes ha few database queries. When I get 20 or more members on my site the server crashes because of all the calls to the database. Is there another way to check for changes in the database?
//Can't Chat
$strFind="SELECT * FROM cantchat";
$result=mysql...
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?
...
Hi! I'm using this script to add a comment and to load the server response:
$r=" $('#somestuff').hide();
$('.button').click(function() {
// validate and process form
// first hide any error messages
$('#somestuff').fadeIn(5000);
});
$('#subm').click(function() {
// validate and process form
...
I have a situation here where I need to be able to add, delete and reset the passenger name list dynamically, with maximum 10 passengers.
Below is the code for html interface:
<div id="add_passenger">
<br>
<input type="button" id="add_pax" name="add_pax" value="Add Passenger Name" />
<input type="button" id="del_pax" name="del_pax" val...
Hi folks, i do not quite understand what is wrong with my code - it is even causing my server to hang up.
What i need to do is for the controller to return a JS script that when executed, will append a rendered partial to my $(".reviews")
# test.html.erb
$.getScript("/test");
# controller
wants.js do
render :partial => "/shared/...
hello,
I have several divs within the same form. What I am trying to do is to disable the tab key in one of the div in the form without disabling the tab in the other divs in the same form.
Example:
Form
div1 - disable tab key
div2 - tab key works
div3 - tab key works
...
Hi,
I just tried out the jQuery Validation Plugin and when I click in a textbox it gets highlighted with a brownish/beige color, how can I change this to another color?
http://docs.jquery.com/Plugins/Validation#Validate_forms_like_you.27ve_never_been_validating_before.21
Thanks in advance.
...
I want to add a hidden input after some element.
I am using this code:
$("<input type="text">").insertAfter(".addProduct");
It doesn't work. But if I replace to it works.
$("<span>ddd</span>").insertAfter(".addProduct");
It works.
Help me.
Thank you.
...
In two years of development, I found only one bug in jQuery. I confirmed it as a bug by reviewing related tickets at dev.jquery.com, and it was later fixed.
Now, however, I've found another. And this time, I want to submit a proposed patch. I've corrected the bug in my local copy of jQuery, and want to submit it to be evaluated for incl...
On submit button i want to disable the button so user does not click more than once. im using jquery for that but its not working, my code is
setTimeout($('#btn').attr("disabled", true), 1);
return true;
button get disabled but my controller does not call. what am i doing wrong?
...
I'm trying to hide a layer but can't seem to figure out how to get this working here's what i'm trying
if ($('#dgAvailable_ctl02_lblpricefrom > strong').text() == '£'){
$('#dgAvailable_ctl02_lblpricefrom').parent().parent().hide()
}
And my code is
<div class="resultsitem" style="background-color: rgb(238, 229, 208);">
<div class...
Hey guys,
I am struggling with my jquery hover combined with $.post.
My goal was to create a bunch of select buttons and if I hover it an image would change(a path to this image would load by $.post). The image would change to its default on mouseout.
And if the select button is clicked it would change the image permanently.
The i...
Hello,
in my .net-Project, I use a master page on which I dynamically register the
jQuery-library.
public partial class Application : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
ScriptManager.RegisterClientScriptInclude(this, this.GetType(), "jquery", VirtualPathUtility.ToAbsolute(...
Hi, I am using the jQuery validation plugin and when I add the class required to the textboxes it validates the fields. However, the error message is shown after the text box and I wonder if I can show it after the label to related textbox instead?
I have a page in an iframe and when two or more error messages are shown the form becomes...
i have 6 element and i want to select the 5th element (with jQuery)
$(".deskripsi")[2]
then give it a method, but when i try it it give me error in console log
$(".deskripsi")[2].innerHTML is not a function
can somebody tell my how to select element array in jQuery and give it method.
oke, may it's seems my question is still uncl...
Hi guys, I am trying to dynamically create two drop down lists, one will be provinces, and the other will contain the cities of each province, so when a user chooses a province, the cities drop down will populate, I am using jQuery's $.ajax funtion to get the data from a database which then passes it back as JSON, here is what I have thu...
Hi,
Can someone help me do one of two things.
1) Make the cycle plugin highlight the relevant button.
or -
2) Make the cycle plugin stop rotating once a button is clicked.
My problem is that the images cycle, then I click a button. The cycling resumes but the previously selected button stays highlighted. Either fix will be suitabl...
I'm building a website at the moment and in the design it shows a scrollwheel in the form of this example.
I've got no problem creating this using something like scrollable or some other similar plugins, however, they don't allow you to click and drag through the images and "flick" them in such a way as the flash example.
Do you know ...