Hi,
I'm trying to assign a different number to different callback functions in jquery.
for (i=o;i<types.length;i++) {
$('#ajax'+types[i]+'Div').html('Loading...').load('searchAjax.php','new=u',function () { $(this).find('select').change( function() { AjaxDiv(i); } ) } );
}
Everytime I run this section of code, i is 5 for each c...
Hi folks,
I'm trying to use jQuery's queue() to show() a div prior to submitting a form. However my current code just immediately submits the form before the show() effect even starts. BTW #savebutton is not a submit element, just an image with this click event.
$("#savebutton").click(function () {
$("#saving").queue(function()
...
Hi There,
This is probably a simple one but I cant get my head around it.
Basically I have a list that is set up to accept dropped elements. I want a jQuery dialog to display in response to a dropped element and, upon the user pressing OK, post to the server with info regarding said dropped element.
My current problem is that I have t...
JS:
function ajax_post_var(url, event_id)
{
var info = $.post(url).responseText;
alert(info);
if (event_id == '1')
{
do something with info...
}
...more if's here...
}
ajax_post_var('http://www.website.com/a.php', 1);
a.php displayed the text TEST;
Why does info show undefined...
I'd like to be able to use the returned value for so...
I'm making a $.get to call a service 'A'. Service 'A' returns plain text which I display on the page. But sometimes it redirects to service 'B' which returns plain text. But, I'm unable to handle the response text of service 'B'. How do I do that?
...
Consider the following markup:
<x>
<y>code1</y>
<z>stuff</z>
<y>code2</y>
<z>foobar</z>
</x>
Using jQuery, how do I select the <z>foobar</z> node in the given markup using the following rule: find the z-node that follows after a y-node which has a body containing "code2"?
...
Hi, I just read this article at Smashing Magazine (http://www.smashingmagazine.com/2009/11/21/zen-coding-a-new-way-to-write-html-code/) about Zen Code. Maybe there is any jQuery plugin for this? Might be good for json data inserting/templating.
...
For the life of me, I can't see what I'm missing. I had hard-coded the value for selectedIcon in the drawmenu function. It was working perfectly until I changed it to a parameter. I'm getting the following error:
Error: this.call is not a function
Source File:
http://localhost:9090/tests/jquery-1.3.2.min.js
Line: 19
...
Hello. I have an application with a long list that changes frequently, and I need this the items of this list to be draggable. I've been using the jQuery UI draggable plugin, but it is slow to add to 400+ list items, and has to be re-added every time new list items are added.
Does anyone know of a plugin similar to the jQuery UI dra...
Hiya,
I'm digging around with jQuery for something work related, and I am trying to get a specific flow of events working which I can't seem to get my head around.
I understand how jQuery runs on the front end, functions are called or available to call from within the document.ready area, and have got some animation running on my front...
Using $("#id").css("background-color") to retrieve an element's background color (or most other CSS attributes) works just fine, but
$("#id").css("border-color") returns an empty string.
How can I get the border color value used on the element?
...
Hi All
I'm using TinyMCE on the text-areas in my Magento admin section. I have my TinyMCE editor visible form the start, but I want the option to disable/re-enable it.
I'm using the jQuery plugin version, so I added some script, which is almost working. However, it's only affecting the first instance of TinyMCE - if there are any other...
I'm using the jQuery.Cascade plugin in my Asp.Net MVC application. I've got it all working in a manner as follows:
jQuery("#CompareModelList").cascade("#CompareManufacturerList", {
ajax: { url: '/Home/Models' },
template: commonTemplate,
match: function (selectedValue) { return this.Manuf...
Hi
I am loading a simple txt file from the same server as the current web page using jQuery - this file will always include a plain number with no formatting - e.g. 123456
$(document).ready(function(){
var test;
$.getJSON('myfile.txt', function(data) {
test = data;
showAlert(); // this call will display actual value
...
hello,
i use a sIFR title in a list on my website. i fade list-items out and in. works fine. but in IE when i fades, the sIFR title suddenly has a black background. but just during the fade-animation. saw that also on other websites...
any ideas or former posts? thanks!
...
Newbie jQuery question:
How do I find out what number a given div is in the DOM-tree?
$('div.dashboard-module').each( function() {
var divNumber = $(this).[DON'T KNOW WHAT TO WRITE HERE];
});
alert('This div is number ' + divNumber );
Hope it makes sense! :)
...
Hi,
I'm using the following code to request data from an ASP.net MVC application. I'm also using TcpTrace so that I can see the request/response.
if (isInteger($('#txtDay').val()) && isInteger($('#txtMonth').val()) && isInteger($('#txtYear').val())) {
$.ajax({
type: 'POST',
contentType: 'application/json; charset=u...
hi,
i'm dynamically adding rows to a table using jQuery.
the table is inside a div which has overflow:auto, thus causing a vertical scrollbar.
i now want to auto-scroll my container-div to the last row - what's the jQuery version of scrollintoView(tr) ?
thx
...
I'm trying to show one div and hide other divs with the same class, when a link is clicked
$(this).find('h2 a').click(function() {
$('.expand-collapse:eq(' + numberFix + ')' ).show('fast');
$('.expand-collapse:eq:not(' + numberFix + ')' ).hide('fast');
return false;
});
It does show the affected div, but the other divs don't hide - ...
I have some jQuery tabs one of which holds a flash video. When I play the video in one tab and click to another in FF or Safari the video stops along with the sound, clicking back to the video tab reloads the content - as expected.
In Internet Explorer this is not the case, the video continues to play even when the tab is not selected....