jquery

jQuery Autocomplete Plugin -- Handling non-matching value with result handler

I'm trying to figure out how to get the jQuery Autocomplete plugin to handle a non-matching value. When there's a match, I'd like to submit the form (this part works) and when there isn't a match, I'd like to display an error message. The if (data) part works. Shouldn't the 'else' portion of my if statement execute when a non-match is...

Spider web chart in JQuery

How to create the Spider Web Chart using JQuery? Is there any one can help me to create the Spider Web Chart using JQuery in ASP.Net? ...

weird jquery problem in IE8/7

hello. the problem starts when i use #mydiv{ margin:0 auto; } all other browsers just works fine. this is an example alert($("#mydiv").position().left); //output 0 $("#mydiv").animate({'left': '-=500'}); alert($("#mydiv").position().left); //output -499 how can i solve that? is it a common ie problem? is there any solution fo...

Form submits twice when pressing return/enter

I'm using anchors as links, and also I'm binding the enter/return key to submit a form, like this: $("form[name!=smsform]").bind("keyup", function(e){ if(e.keyCode == 13){ $(this).submit(); }); $("a[title=submit]").click( function(){ $(this).parents("form").submit(); }); However the form submits twice when clicking enter/return using...

jQuery Plugin to simulate browser page zoom/text zoom?

Hi all, I am looking for a jquery plugin to do text zoom / page zoom effect (like FF 3 ctrl++/ctrl--), which can... resize the text with different font size setting (i.e. text zoom / page zoom) work with complex HTML+CSS structure Any recommendation here? ...

jQuery under SVG

Is there any way I can run jQuery under SVG instead of HTML? I know about jQuery svg plugin but this is not what I want. As for now the jQuery engine contains some statements like this: div = document.createElement("div"); div.style.display = "none"; It fails with exception during jQuery initialization under SVG because SVG docume...

Ajax: Load page content to div with select box

I'm trying to load page content into a div via Ajax when a select option is selected eg. I have a select box with 2 options the values are test.HTML and test1.HTML and under that I have a div and want the content from test.HTML and test1.HTML to load in the div when the select box changes... Via Ajax any suggestions? Thanks ...

How to set the text of a submit button using JQuery?

For some reason... $("#thebutton").val("New text") doesn't work. ...

$("#txtquery").attr("disabled","disabled") sets textbox value to blank

I want to restrict user to enter values in textbox at particular button click otherwise set disabled false. If I set $("#txtquery").attr("disabled","disabled"); it sets text box to blank. I want to retain the text if readonly is toggled. ...

JQuery timer, how do I do this

Is there anyway to implement a timer for JQuery, eg. every 10 seconds it needs to call a js function. I tried the following window.setTimeout(function() { alert('test'); }, 1000); but this only executes ones and then never again. ...

Why does jQuery fail to hide certain HTML?

I've been running my head into a wall trying to figure this out. Take the following HTML body: <body> <div id="project"> <h1>Hi</h1> <h2>Hello</h2> </div> </body> And the following jQuery code: $(function(){ var h = $('#project').html(); $('#project').remove(); $(h).hide().appendTo('body'); alert("Created HTML, hide, and ...

RadComboBox, how to get selectedItem

Dim sb As StringBuilder = New StringBuilder() sb.Append("<script language=javascript>") sb.Append(" function SetValueInBody() {") sb.Append(" var _dllGetDynamicFieldKey = $find('" + _dllGetDynamicFieldKey.ClientID + "');") sb.Append(" alert('Set Value: ' + _dllGetDynamicFi...

Which jQuery plugin animates an element by sliding it across the page to a 'target' element?

Hay, I'm looking for a jQuery plugin which i've seem before but can't now find it. It animates a div and makes it look like it is being sent to another div, imagine that you click 'buy' on an item and the item appears to moved across the screen to a shopping basket. Any ideas what it is? ...

How do I make a div slide up and disappear in JQuery?

And just...poop, HTML gone. How do I do that? thanks. I know about .hide() , but..I want permanently gone (for that one page), and slide up. ...

Autocomplete and text pasting / middle deletion

I'm building an autocompletion system in jQuery, and I want to know the best way to deal with text pasting and deletion from the middle or beginning of the query. I would rather not reparse the whole query for each keystroke, as my parsing takes a significant amount of time to parse the whole query as opposed to additionally parsing just...

$(this) and this, what difference?

Could someone please explain a bit, what difference between them? For example I could do that with "that": var bar; button.click(function () { if (bar == this) { alert('same'); } bar = this; }); and couldn't with $(that): var bar; button.click(function(){ if(bar == $(this)) {alert('same');} bar = $(this); });...

Simple Object Moving in Jquery

Hey, I have a site going here: http://treethink.treethink.net It uses fancybox to display the content pages when a nav item is clicked. The overlay pops up, content is faded in through an iFrame. What I want to do is change the in and out transitions to what I had going here: http://treethink.treethink.net/backup So basically I need t...

jQuery: How to stop the change() event from firing from the blur() handler?

Hi, I have the following scenario: $("#element").blur(validate).change(onElementChange); The validate() function should prevent the change event from firing, if the value of the #element is not valid. I cannot add the validate to change, because it needs to validate on blur too. If add the validate() to both events, the alert with ...

Attributes in JQuery

Suppose I have these divs: <div class="hat" rel="cap"> <div class="hat" rel="pine"> <div class="hat" rel="mouse"> How do I use JQuery to do a "where"? For example $("div.hat").remove WHERE rel="mouse" ...

Jquery ajax Load catch any to display loading

Hi I have a complex site with lots of jquery loads in various places and in different files. I want to have a single method which renders a loading popup when any of the ajax loads run, without (hopefully) modifying them all. Anyone know a way to 'catch' any ajax request start, and also the request end? Thanks ...