jquery

uibinder element get with jquery selector fail on chrome/safari

i have uibinder html element like below <g:HTMLPanel> <div class='thumbnailWrapper'> <ul> <li> <a href='#'><img src='41546-140.jpg' /></a> <div class='caption'> <p class='captionInside'>testing javascript</p> </div> </li> <div class='clear'>...

Delegate handler for inner list?

Hi, I have the following: <ul id='foo'> <li> <ul class='a'> <li class='animal'>goat</li> <li class='animal'>horse</li> <li class='animal'>pig</li> </ul> </li> <li> <ul class='a'> <li class='animal'>zebra</li> </ul> </li> </ul> I want to make a delegate handler for the inner li items (th...

How to Call Internal Function From External Function in jQuery

$.fn.myTest=function() { var externalfunc=function(){ alert('haii'); } }; $.fn.myTest.sample=function(){ var self = this; self.myTest.externalfunc(); } Can someone tell me how to correct this? ...

Making this JavaScript function simpler with jQuery?

I have this, text, that when you click on it, you can edit it and when you click somewhere else it will store it to the database(by sending ajax call), and your edited new text will show. Here is it: http://jsbin.com/ewihu3 Try clicking at the text, and you will see it become a field and so. Here's my current code: http://jsbin.com/ew...

Escaping single-quotes javascript

I think the below problem is something to do with escaping strings, but i'm hoping someone will confirm that. i need to append event.id to the submit value like so: /Events/Edit/ + event.id. There is definitely content in the event.id property as it displays correctly the second time i use it. $('.ui-dialog div.ui-dialog-buttonpane')...

Problem with long polling with JQuery on Tomcat Server

I created a CometServlet according to this example http://tomcat.apache.org/tomcat-7.0-doc/aio.html. Then I tried to get data from it using JQuery. The code is following: $(function() { $.longPoll = function(url, success, error) { $.ajax({ url : url, success: function(data, status) { ...

how can i trigger ajax error callback on success callback?

I'm looking for a way to trigger ajax error in success callback. i have tried to explain my problem code below: $.ajax({ url: requestURL, data: postData, type: 'post', success: function(response){ if(response.Success){ // do something }else{ // request workflow fails in this case, // i have to trigger thi...

Jquery Autocomplete - help with code - what next?

I'm using this plugin here: http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/ I have this: function formatar(result) { return result.q + ' (teste ko)'; } $(document).ready(function() { $('#nome_dominio').autocomplete("testeJson2.php", { parse: function(data) { alert(data...

how to do auto slideshow on simpleSli.de

I have created a simpleSli.de from http://www.simplesli.de but I cant figure out how to get it to autoslide. Any help would be greatly appreciated. They website says that I just have to do this <div class="auto-slider" rel="group"></div> // Add this javascript, and ensure it appears after the simpleSlide() call $('.auto-slider'...

jquery load problem in ie8 compatibility mode

I use the load plugin of jquery in my webapplication. Here is my piece of code: $.post("/ecommerceV2/"+langcode+"/ecommerce/sortPromo",{promotypeid: $(v).val()},function(response){ if (response.same == 'yes'){ $('#infoLegende').show(); $('#infoLegende').html('no' + $('#legende'+$(v).val()).html()); }else{ $('#infoLegende'...

Change css class with JQuery \ Watermark

My application is trying to show a text watermark in a textbox on a form, but I don't want to touch the actual value of the box. So, I'm trying to use a background image with the watermark text, using classes; .watermarkon input { background-image: url('../forms/images/TypeNameWatermark.png'); background-repeat:no...

problem with jQuery and image caching

Hi, im developing a little jquery gallery plugin for my personal use and im stuck at strange problem, it has probably something to do with image caching... Im loading images via attr('src',xxx) and i need them to resize so they fit in every resolution, i wrote a little function to do that, but the loaded image is always using dimensions ...

Can't get jQuery's .replaceWith() to work?

Hi. Basically I am trying to have jQuery replace the button with the form and status div once clicked. I am new to jQuery and hardly an advanced programmer so I am sure the solution will be relatively simple. On the other hand I am at my wits end with this issue and any help would be greatly appreciated. Thank you. EDIT: Solution fou...

jquery toggle bottom left to top right

hello i have got this script all works fine but i was wonder if its possible to toggle bottom left to top right $("a#slick-toggle").click(function() { $("#slickbox").animate({width: "toggle", height: "toggle"}, 1000); }); thank Gareth ...

jQuery: onclick, edit field and show+save into an variable

Right now I have this in Javascript without jQuery: Here is it: http://jsbin.com/ewihu3 It's working just fine, but I wish to use jQuery for making the code simpler and shorter. I want exactly same things to do as on the example above, that when you click on the text, it should turn into an input field. And on blur it should display w...

jQuery/UI Auto complete but only allow existing words to be typed in

Hopefully I am explaining this correctly, I have a long predefined list of items (products in my db) and I would like the user to be able to type and auto complete a product, however if that product / word is NOT in the list, I don't want to allow additional characters to be typed. So the auto complete would ideally block additional inp...

jQuery - send multiple URLs to multiple text input fields

Hey all, I'm having a problem with jQuery that I thought would be simple, but I still haven't found a solution. I have an upload form for users to upload images in WordPress, and when a user clicks "insert into post" the url of the uploaded image is supposed to go into a text input field. I can get 1 to work fine, but when I have mult...

reset a form to the default values

Currently I have: $("#your_email").val(this.defaultValue;) I want to be cycling through all form elements and resetting them to their default value ...

Scroll to a position in page Jquery Asp.net ?

Hi fellow, I have a long form which I want to be scrolled at a point where my gridview is located after a successfull partial postback with an update panel. How can I achieve this with JQuery. I am using update panels in VSS 2005. ...

How do I stop anchor tags from shifting div content upwards

I'm having a strange problem with anchor tags shifting divs upwards which is causing quite a bit of headache, but because there are so many different pieces in the mix, I don't know which one is causing the issue. I'm attempting to build a UI that uses a modal dialog box from the jQuery UI library to display a horizontal accordion styl...