jquery

ByPass jQuery Plug-in OnClick Funtion

Hi, I am using the following jQuery plug-in, i.e: http://flowplayer.org/tools/scrollable.html The issue I am having though is that, as part of the call to the api, it seems to make us of the onClick() function within the plug-in js file. I actually want to use the onClick function as your normal javascript onClick() function but I am...

jQuery show "loading" during slow operation

I'm trying to show a small loading image during a slow operation with jQuery and can't get it right. It's a BIG table with thousands of rows. When I check the "mostrarArticulosDeReferencia" checkbox it removes the "hidden" class from these rows. This operation takes a couple of seconds and I want to give some feedback. "loading" is a di...

jquery js how to avoid massive onmouseover onmouseout firing

i have a table with some columns. in each of them is a picture where i have a onmouseover onmouseout event on it, which show a message in a div and hide the msg. my problem is - after a user goes quick from left to right (and moving) over a lot o images. all mouseover/out events of the images where executed, which looks stupid... is it ...

Does anyone know when jQuery 1.3.3/1.4 will be released?

Apart from one hint on the following site: http://groups.google.com/group/jquery-dev/browse_thread/thread/13df4a99e372e223/ba7f6d54fd059b77?lnk=gst&q=1.3.3#ba7f6d54fd059b77 i've not been able to find anywhere that hints at a possible release date or timescale for jQuery 1.3.3./1.4 Does anyone know any more than this? ...

Why input value can not be changed when pressing escape

I have an input (outside form) that captures name of an image. User should fill in a new name and hit enter. Ajax callback renames the image. This works. I'd like to add ability to 'reset' the input content when the user presses escape (#27). But I'm not able to fill the value of the input with my value. The code is <input id="escapeI...

JQuery explanation on document.ready

Hello, I have question will the click event or any other event run in document.ready() for the first time? I mean will it reach after loading DOM elements to the comment without clicking first time? :) $(document).ready( $(#foo).click( function() { // "It reached here after DOM is loaded!" } ) ) ...

Javascript InnerHTML in IE7 messing with INPUT tags

When I receive the innerHTML of an element containing an input[type=text] element the speech marks around the value and id are removed in IE7 i.e. <input type="text" id="test" value="test" /> Becomes: <input type="text" id=test value=test /> This would be fine, other than the fact that I am using a JQuery plugin that takes a html s...

Finding the ancestor's id of a child

Hi , I am having a Html like .. <div id="Field1"> <label id="label1">Name</label><br/> <input type="text" data-attr="text" style="width: 200px;" id="input1"/> <br/> <label id="instr1"/> <div class="xfb-row-options1> <a class=button-delete src=">- <a title="Add" class="bu...

how to fetch array keys with jQuery?

Good afternoon. I have an array with some keys, and values in them. I then need to fetch the array keys and not the data in them. I want to do this with jQuery. I know for example that PHP has a function called array_keys(); which takes the array as a parameter and gives you an array back with each key in each index. This is what I came...

Can I select elements with a set of attribute values?

Is there a way to refactor something like this: $("input[name='InputName1'],input[name='InputName2']").val(""); into something like this: $("input[name='InputName1|InputName2']").val(""); Essentially, is it possible to select elements based on a set of attribute values without the repetitive parts of the selector? ...

Conflicting event-handling in jQuery

I have a <div> like this: <div id="Field1"> <label id="label1">Name</label><br/> <input type="text" data-attr="text" style="..." id="input1"/><br/> <label id="instr1"/> <div class="xfb-row-options1"> <a class="button-delete" src="..." style="...">-</a> </div> </div> I already have a jQuery function: $("#fb_contentarea_...

jQuery star rating in a table

Hi, I have an MVC application generating a series of radio buttons based on a dynamic set of questions. The questions are generated, and the star rating works perfectly, but for some reason, when I try to have each radion button in its own cell in a table, once the javascript kicks in, all the radiobuttons appear in just one cell. Wit...

How to create a tooltip with jquery without a plugin?

Hi everyone, I have used a few different tooltip plugins over the years, but I think its become time to write my own. Simply, I'm not looking for a plugin which has all the options, as I know how I want every tooltip that pops up to look and behave. Most plugins have a range of animation and positions available and I think thats excessi...

Get ALL items in a SelectList within ASP.NET MVC controller

Is there a way to post all items in a SelectList (multiselect) to the method of a controller? By default when I use a SelectList it will only post the selected items to the Form. I have a couple of MultiSelect controls on a View. Using jQuery the user can move items from ListBox1 to ListBox2 and vice versa. When the form is posted I wan...

jQuery draggable + droppable: how to snap dropped element to dropped-on element

I have my screen divided into two DIVs. In the left DIV I have a few 50x50 pixel DIVs, in the right DIV I have an empty grid made of 80x80 LIs. The DIVs on the left are draggable, and once dropped on a LI, they should snap to center of that LI. Sounds simple, right? I just don't know how to get this done. I tried by manipulating the dro...

Is there a generic way to implement an ConfirmIfDirty feature for a web page?

On stackoverflow, and other websites, if you start making a change to form elements and then you try to navigate away from the page, you will get a confirmation message asking if you are sure you want to discard your changes. This seems relatively easy to do by hand, but impractical to apply across an entire site. Is there any generic ...

IE 6 Debug Help!

I just uploaded my site to the server, and it is working perfectly in Firefox and IE8, but not IE6 (have not tested in IE 7)... Here is the address: http://hqinternetsolutions.com/fullservice/index.html There are two problems on the homepage that I cant seem to figure out. The header (which uses jquery to shift the images) appears far...

How to fire events programatically in jQuery?

Hi All, I have a page which loads divs of rounded corners. And on each div (including all the inner divs, spans inside this div) I call many events related to them. Now the problem I'm facing is load time. Do we have any approach to load the script for rounded corners first in "ready" function and rest of the events dynamically when I m...

How to dynamically show/hide a facebook login button

How can I determine via javascript if a user has logged in to my site via facebook connect or not? Based on this result, I would like to show/not show a <fb:login-button> button on the site. If I did something like this using jquery: <div id="login"></div> <script> if (notLoggedIn) { $("#login").html("<fb:login-button></fb>"); } <...

strange behaviour in select option:selected

Hi, I have a few select options boxes on one page, I'm trying to get the value and text of the selected options and insert them into hidden fields, if I select the first one only(first time after page reload)it doesn't work, but if I select the first one and second one after page reload it works, to make it work I have to first select ...