jquery

Parent element selection problem?

My HTML is something like this <div id="mydiv" class="common"> <input type="text" id="text1" value="" /> <input type="text" id="text2" value="" /> </div> I am assigning a function on the onclick event of the textbox like this $(document).ready(function() { $(".common input").click(function() { //////// Wh...

Possible to change background-color onClick, then automatically change back a second later?

Noob here - I'm working on a simple Javascript calculator, and I'm using lists (li) for buttons. I want the li background-color to change onClick, but then automatically change back half a second later. So basically I want the button click to flash the new color, not toggle it. Is this possible? Edit: This is what I have in my header...

Which event belongs to "type text into textfield" using jQuery

Hi there, Just imagine a formular where there is a checkbox and a textfield. If someone starts typing into the textfield "bla bla bla whatever", the checkbox should tick itself. Is there a event that corresponds to the typing or do I have to use .focus ? ...

Losing Textbox value on postback

In a page I have a link; clicking on it opens a dialog and sets a textbox value for that dialog. However, once I click on submit in that dialog, the textbox value is null. Link: <a href="#" onclick="javascript:expand('https://me.yahoo.com'); jQuery('#openiddialog').dialog('open'); return false;"> <img id="yahoo" class="spacehw" src="/...

jQuery and HTML visual glitches on table cell .toggle

I have table that gets dynamically created. When using jQuery and toggle, everything works. I however get a small visual glitch - it seems the HTML sometimes get selected. How would I disable this on a faulty drag or mouse operation? Is there a difference in the DOM between text in a cell and 'not text' or buffered space in a td? Than...

add width li's to parent ul

i would like to calculate the width of the li's for each submenu en then put in the ul element. example <ul> <li>level 1</li> <li> <ul style="widht:??;"> // total width li's added here 70px <li>level 2</li> // width of this li 20px <li>level 2</li>/ width of this li 50px </ul> </li> <li>level 1</li> <li>level 1 <ul styl...

Jquery scroll to a div tag

I use the following in order scrolling to top. How could i edit it so the top is set by a div tag? var pageRequestManager = Sys.WebForms.PageRequestManager.getInstance(); pageRequestManager.add_endRequest(function() { $('html, body').animate({ scrollTop: 0 }, 'slow'); }); ...

Compare two date whit jquery

Hello, i have two String fields who represent Date in my page and i would to compare this two fields to know if my first date < second date <tr> <td align="right">First Date: </td> <td align="left"> <html:text name="addPublicationForm" styleId="firstDate" property="firstDate" maxlength="10"/></td> </tr> <tr> <td align="right">Second Dat...

Second time real value post problem

I have added ckeditor on my page. the thing is that when i make changes in the value in the ckeditor and post the value to the controller the new posted value is not there (the previous value is coming). the new value comes on posting it second time.the cycle goes on(the changes in the value in the ckeditor comes on the second posting). ...

create a configuration editor from xml using jquery

Hi All, is there any plugin can create a configuration editor (like about:config in Firefox) using jquery. I have a xml based configuration file, I want to load it, edit it and then save the changes again into the xml file. ...

Libraries and pseudocode for physical Dashboard/Status board

OK, so I bought a 46" screen for the office yesterday, and with the imminent risk of being accused for setting up an "elaborate World Cup procrastination scheme", I'd better show my colleagues what it's meant for ;) Looking at my simple sketch, and at these great projects from which I was inspired, I would like to get some input on the ...

jQuery: form input values turns up undefined

Having problem with this bit of code qith jQuery. it should pick the values from current form and then submit them, but when I try to get them with jQuery they always turn up undefined. I know the SQL results are fine since they show correctly in HTML table, so it must be my inferior javascript skills. New with jQuery and I'm at loss :( ...

JQuery selectors select from an html object other than from document root?

jQuery selectors select from the document. How do I select from somewhere else other than root? Say I want to select some children from an html object. For this function dothis(obj) { $j("#tabs").removeClass(); $j("#tabs>ul").removeClass(); $j("#tabs>ul>li>a").each(function() { var tabNum = $j(this).attr("h...

jQuery slideToggle jump on close

Hi, I'm trying to slideToggle a in a table with jQuery and it works in FF, OP, CHrome. Only IE (6,7,8) is giving me problems. It slides down perfectly down and up, but after the slide up animation is finished. The hidden pops up in full height and then closes. So I guess it must be somwhere inbetween when it switches from a minimal h...

Enable Disable JQuery Drag-able

Hi all I am working on a print form that will enable Admin user Change the lay out of the print form so i select JQuery Dragable for the job and its working fine but their is one problem when Enable or Disable the first Element in HTML that is dragable take the Disable Style when Dragable is Disabled the other element keep there orig...

Is hardware accelerated CSS3 in Safari 4 & 5 broken, or my CSS and JS?

Hi all, I've created a somewhat silly site that shows you the expected weather forecast for any city in the World. On webkit based browsers, when the weather is sunny a sun with CSS3 animated rotated sunbeams appears. This works fine on Chrome. An example (sunny, at the moment) page is: http://willitraintoday.co.uk/iceland/reykjavik/ ...

Updating div after full page refresh following AJAX request

Hi, I have an AJAX controller action which returns JSON. The returned JSON is handled via jQuery and contains a message displayed in an update div. The JSON also contains a flag which indicates a change in state. If this is true the entire page needs to be reloaded from a different url. This is currently performed in the jQuery using wi...

jquery selector

Hi, I was wondering how I could use JQuery to select the child of a parent? I have the following. $("#navigation a.subpage").click(function () { $("#navigation ul ul")... The HTML looks like this. <li> <a class="subpage"...</a> <ul style="hidden">...</ul> </li> I need to somehow select the parents of the link. That would ge...

How to Load a page in a dynamically generated iFrame when a link is clicked like a lighbox in jQuery?

Hello, I have a list of links eg : <ul> <li><a href="http://google.com"&gt;Link1&lt;/a&gt;&lt;/li&gt; <li><a href="http://example.com"&gt;Link2&lt;/a&gt;&lt;/li&gt; <li><a href="http://example.com/sdf"&gt;Link3&lt;/a&gt;&lt;/li&gt; </ul> When a link is clicked, a iFrame should be generated in the middle of the screen loading the pag...

.attr("disabled", "disabled") problem

i have this function where basically add and remove the disabled attribute form a input field: $(bla).click(function(){ if (something) { console.log($target.prev("input")) // gives out the right object $target.toggleClass("open").prev("input").attr("disabled", "disabled"); }else{ $target.toggleClass("open").p...