jquery

jquery:Detect Finish of Loading Image....

Hi all, i use the following code to load image to a cell $(cell).css("background-image", "url("+iconImage+")"); As this image is loaded from server....it take times...i want to add an activity indicator on this cell until the image is loaded and stop when the image is loaded..i saw some example but as i don't know jquery....can not fi...

jQuery function used as event handler and for initialization

I'm doing this over and over, and I'm not sure if it is the best way to do so in JavaScript/jQuery. I have a function that acts as an event handler, but also I need to call it on page initialization. Thus I have been using the following code: <script type="text/javascript"> $(function() { function doToggle() { $(...

javascript:show alert if not match

dear all..i have a textfield. i want after i have typed identity number inside it, the script can identifying to "user table" at DB. i want if id number not match can show an alert.. how do i do that?i'm newbie at javascript ...

jQuery - Dynamic table rows don't work in IE/Opera

Example (works in firefox): http://progamonth.com/files/tablestestfile.html I can't get select elements to dynamically get added to a table. This works in firefox, but it fails in IE and Opera. What's going on here? DOM code: <table id = "myTable"> <thead> <tr><th>1</th><th>2</th><th>3</th> </thead> <tbody> </tbody> </table> <select i...

Convert Carrage returns to br tags

Hi All, I'm stuck with a small problem of parsing carrage return in a text area. JQuery Code $.fn.escapeHtml = function() { this.each(function() { $(this).html( $(this).html() .replace(/"/g,"&quot;") .replace(/&/g,'&amp;') .replace(/</g,'&lt;') .rep...

JQuery: Dialog's current position after moving

Hello I got this little problem. I cant get the current position of JQuery after I move it. Seems like it wont update its position. It just gives the first one. Another problem I came up with was that the dragStop event wont work either.. ...

Why does this line 'jump' when I call slideDown?

Since there's a lot of code, I won't post it here. Rather, you can find it all here. That way you can play around with it and run it. The problem happens when the 'Drop me down!' link is clicked. The DIV slides down as expected, but makes a sudden 'jump' right at the end. Why does it do this, and how can I make it go away? ...

dynamicaly populate input text box value on select onchange

models.py class Subject(models.Model): code = models.CharField(max_length = 31) name = models.CharField(max_length = 31) credit = models.CharField(max_length = 31) def __unicode__(self): return str(self.code) + "-"+ str(self.name) class Student(models.Model): name = models.CharField(max_length = 31) ...

Compare jQuery Arrays with multiple DOM elements

Consider this: <div class="test">one</div> <div class="test">two</div> <script> var i1 = $('.test'); var i2 = $('.test'); console.log( i1 == i2 ); console.log( i1 === i2 ); console.log( i1.is(i2) ); </script> They all print false although they contain the same elements. One would think that .is() would work for comparing but it do...

Best way to insert an array of jQuery elements to the page

What's the best way of appending an array of jQuery elements to the page? I know that if I'm appending straight HTML tags then they should be collected together in an array then the array appended. This is the fastest method. However I have a collection of jQuery elements that have events created on them so I can't just concatenate stri...

How can I make page scrolling trigger mouseover events?

When the mouse starts hovering over an element because of scrolling (either by wheel, or by keyboard scrolling), it does not trigger a mouseover event on the elements it is hovering (Chrome 6 on OSX). What would be an elegant way to trigger the mouseover event for the correct elements when scrolling? ...

Problem Jquery load function with IE

Hi There I have a problem with a load function in jquery i try to call data from an url, images and text but this is not working in IE but is working with Firefox Something like this function loadProperties(propertiesPage) { $('#properties .content').slideUp(500); $('#properties .content').load('url' + propertiesPage, functio...

What is an accordion called that can expand more than one panel at a time?

Hi, Can someone please tell me what is the name of a widget that works like an accordion but where you can expand more than one containter/panel at a time. I am very new to all this programming lingo? ...

getJSON function always returns null

Hello all I am trying to make a get http request using jquery getJSON function. I have implemented it like this... <script type="text/javascript"> $(function(){ $("#query").keyup(function(event) { keyword = $("#query").val(); $.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&amp;tagmode=any&amp;...

jQuery $(this).attr("id") not working

Hi guys, as the title says, I keep getting "undefined" when I try to get the id attribute of an element, basically what I want to do is replace an element with a input box when the value is "other". Here is the code: function showHideOther(obj){ var sel = obj.options[obj.selectedIndex].value; var ID = $(this).attr("id"); ...

Jquery animate with live(), possible?

Hi, my jquery animation is not working, i think the porblem are the dynamic elements. Is it possible to say live() with animate()? $(".tls").animate({"left": "-=50px"}, "slow"); kind reagards peter from germany ...

Asp.Net UpdatePanel in Gridview Jquery DatePicker

Hi all; <asp:UpdatePanel ID="asd" runat="server"> <ContentTemplate> <asp:GridView ID="gvUpdate" runat="server"> <Columns> <asp:TemplateField HeaderText="DATE"> <ItemTemplate> <asp:Label ID="lblDate" runat="server" Text='<%# Eval("DATE","{0:dd.MM.yyyy}")%>'></asp:Label> </ItemTemplate> <EditItemTemplate> <asp:TextBox ID="txtDate" runat="...

click event for option doesn't work in IE

I have a multiple select tag, and i need to write the function onclick of it's options, becouse i need to get the value of last clicked option, but when i wrote the following $("#multiple_select option").click(function() { var val = $(this).val(); alert(val); }); it doesn't work in IE. Whant is the problem? Thanks UPDATE ...

Leading space is not getting retained in IE

Hi, I am working on one application, i am facing one problem on Internet Explorer while retrieving inner HTML of div. I have below input for retrieving : <div> This is first segment</div> I have used jquery script to extract content. i.e. $('div').html(); Output after using above statement : This is first segment Here not retr...

Jquery disable input with attr()

Hi, I have a wired behaviour when I try to disable or readonly a input field using the attr(). removeAttr('disabled') is working ok. attr('name', 'somthing') is working attr('id', 'something else') is working attr('disabled','disabled') not working -> it writes only disabled="" in the DOM and it does not disable the input field at...