jquery

Ajax, jquery form plugin won't work...

Hi all, I'm trying to use the malsup jquery form plugin and I can't get the simple example to work (http://jquery.malsup.com/form/#ajaxForm). I've pasted my code below. What is going wrong? All that happens is I get an alert box that says "Thank you for your comment!". Nothing else happens. Thanks, Mark This is the ajaxtest.html ...

jQuery Update and Scroll like Polling

Hi Guys, Looking for something written in jQuery which allows polling or a plugin which would allow data updates similar to this website. Anyone got any ideas of something like this in jQuery ? Or how to write something ? ...

How to get the innerHtml, including the tag, using jQuery?

Sorry, if the title is too obscure ;D. Actually the problem is, lets say i am this code. <span id="spanIDxx" style="blah-blah"> <tag1>code here </tag2> sample text <tag2>code here </tag2> html aass hhddll sample text </span> Now if i will use the code. jQuery("#spanIDxx").html(); then it will return just the innerHTML e...

jQuery form submitting in firefox

Hello all. Please, help me with one problem. I have this code, for submitting form via anchor. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <title></title> <script src="js/jquery-1.3.2.min.js" typ...

using 'this' and ':not' together in jquery

Hi. I have this line of code $(this).append("<b></b>") and I want to add a :Not condition to it. The best I could reach until now is $(this:not('.someClassName')).append("<b></b>") but of course it's not working. What can I do? Cheers. ...

Images disabled on populating data

function a() { var r1 = '<div id="title_t" style="display:inline;font-size:150%;color:white;" > </div><div name="btbar" id="bottom_bar" style="position: absolute; margin-left: auto;margin-right:auto;;">' ; r1 = r1 + '&nbsp&nbsp<img src="first.png" " />'; r1 = r1 + '&nbsp&nbsp<img src="prev.png" />'; r1= r1 + '<label id="c...

Should you add HTML to the DOM using innerHTML or by creating new elements one by one?

There are two methods to add HTML-code to the DOM and I don't know what is the best way to do it. First method The first way is the easy one, I could simply add HTML-code (with jQuery) using $('[code here]').appendTo(element); which is much like element.innerHTML = [code here]; Second method Another way is to create all the elements ...

jQuery code for sliding div (accordion)

I am looking for some good jQuery, XHTML & CSS code to achieve the effect as seen in the following image: http://i48.tinypic.com/a3o4sn.jpg Obviously this is a static image, what is supposed to happen is the text and the transparent background is hidden, and when you put your mouse over the image it slides up into view and down again o...

Calculate how much bigger one image is from the other one.

Some math calculations in JS problem solving I am working on a zoom image functionality that creates a new div with a large image that is moved through x and y according to the mousemove on the image. The large image should move a certain %, which is what i am trying to figure out. How much should it move by. Here is some info: T...

Supressing form post on enter when a textbox is empty

I am using MVC, not that this makes a difference, but I have a text box for searching. <% using (Html.BeginForm("Index", "Search", FormMethod.Post)) { %> <%= Html.AntiForgeryToken() %> <div id="search_box"> <span id="search-title">Search Site</span> <div> <%= Html.T...

How to bind event after ajax success in jQuery

So here is my code: $(document).ready( function() { $('#form').bind('change', function(){ $.ajax({ type: 'get', url: 'api.php', data: 'task=getdirs&formname='+$('#form').attr('value'), dataType: "text", success: function (html){ $('#chdir').html(html); $('#chdir select').bind('change', getDirs());...

Client side library or AJAX Control toolkit? - ASP.NET

For a slick UI, I am deciding between using a client side library (JQuery or ExtJS) or go with the AJAX Control toolkit. I understand that the widgets supported by ExtJS rich library does not match what's there in the toolkit. What are the pros of cons of using one over the other? ...

How to remove the selected radio button when clicking on an element within page using Jquery

Hello guys, Okay i'm stuck on something here. This is the page i'm working on: https://www.passovermeal.org/ I have two radio buttons with text input fields attached to each. If the second radio button is selected I would like to remove value from first text field. Now if I click on an area on my page like a div with an id of #produ...

Jquery ajax auto complete problem

Hi all, I'm having newbie problems resolving an ajax autocomplete script if anyone would like to offer advise? In my form i wish for users to select an event type (drop down box) which on selecting then displays a text box. This text box then offers a user the ability to autocomplete as they start typing, the options having been genera...

"filter" json through ajax (jquery)

I'm trying to filter the json array through ajax and not sure how to do so. { posts: [{"image":"images/bbtv.jpg", "group":"a"}, {"image":"images/grow.jpg", "group":"b"}, {"image":"images/tabs.jpg", "group":"a"}, {"image":"images/bia.jpg", "group":"b"}]} i want it so that i can only show items in group A or group B. how would i have t...

document.Init in jquery?

Hey everyone- I am wondering if there is an init function in jquery.I am loading some widgets (just simple divs with content) on document.ready(). I would rather preload everything FIRST and then render the page. Instead of loading all the non asych elements first and then the ajax components next, as this is causing a bit of a "flash" ...

JQuery Ajax File Upload

Hi Can I use this below Jquery form to perform file upload using post method ajax request ? $.ajax({ type: "POST", timeout: 50000, url: url, data: dataString, success: function(data) { alert('success');return false;} }); if it is doable, do i need to fill "data" part? is it the correct way? I only post the file to...

Supporting Multiple JS libraries

I have developed one of my modules using Dojo. Its gone really well and I have done a lot of custom plugins and server support in Dojo to allow AJAX calls, RPC + SMD communication with my server. However, now that I am getting onto the user side of things, I am seeing that jQuery has some really nice already built plugins. Do you think...

jQuery .ajax method in IE7 & IE6 not working but working fine in Firefox

This relates to my previous post: http://stackoverflow.com/questions/2318696/jquery-load-method-causing-page-refresh-ajax I changed my implmentation to use the .ajax method instead of .load and it works fine in Firefox but not in IE7 or IE6: $('ul#coverTabs > li > a').live('click', function(event) { // Find href of current ta...

jQuery too much recursion

Im trying to select a radio box when I click an LI. But i get the error "to much recursion". Code is: $('li').click( function(){ $('li.selected').removeClass('selected'); $(this).addClass('selected'); $(this).children("input[type=radio]").click(); }); This is using jQuery 1.4.2 and UI 1.7.2. ...