jquery

jqgrid not executing when bound to click event

I'm not sure why this isn't working but probably because I'm not very familiar with javascript. The following is initialised $('#categoryList').find('.sideboxEntry').live("click", function() { productBindToGrid(); }); productBindToGrid(); function productBindToGrid(filterBy) { $("#productGridView").jqGrid(); } productBindToG...

jQuery problem with firefox, isn't it cross-browser compatiable?

Hello guys, I have problem here with this code below it works on all browsers except Firefox ,it's in external js file and the link in aspx file $(document).ready(function () { var h = $(".img_cover").width() ; if ($.browser.msie) { $(".download_box").width(h + 1); $(".download_pdf").width(h + 1); $(".right_column")...

How to "unwrap" tags ?

I have this bit of HTML code: <center><table><tr><td>table</td></tr></table></center> How can i unwrap table from <center> Sorry, Im not sure even how to start. Many Thanks ...

jquery auto complete for dynamically generated textboxes

hi, i am new to jquery, i am working on a web page which needs generating text boxes dynamically with autocomplete facility. i tested $("#some").autocomplete(data); on some static content, it worked perfectly. however, when i try the same technique with dynamically generated text boxes it's not working! my code looks as follows: $(f...

Z-Index vs Physical Location and jQuery

In the following markup, "image 3" would the only visible div if all .image divs were positioned absolutely and with no z-index. I could "reshuffle" the deck, so to speak, by adjusting the z-index of all elements, or I could reshuffle it by manually placing the last .image div before the first, making the sequence "image 3, image 1, imag...

How does jQuery store xml used as a context parameter as it modifies it?

I'm trying to reduce DOM manipulation during my javascript execution, and I thought about lazy-writing DOM elements, versus writing a large section of the DOM hidden and unhiding the needed parts later. To do this, I've separated out all my DOM content into a JSP which I load into a variable via ajax and manipulate with jQuery. However,...

jQuery drop down--hover for additional classes?

This is my jquery for a simple drop-down-esq menu. I'm having trouble, though. I want the div that slides down when the user hovers over the .mainMenuDiv to stay down when they are hovering over the .SubMenu div also! Help! :) $(function () { var tabContainers = $('div.subMenu > div'); tabContainers.hide(...

HTML form needs double click to focus on field

For some reason one of my forms (I have 2 forms in the same page) is not working properly because I need to double click on each form field in order to be able to enter data. Any ideas why this may be happening? ...

What is the best way to return single object instead of array from jQuery selection?

Newb question: jQuery('.foo')[0] does the job most of the time. jQuery('.foo:first')[0] is slightly more explicit and performant. But this isn't nice when array is empty, so check is necessary. But is there a better way than to use array indexer? i.e. return is a single object or null if not found. I know it's by design an array is al...

jquery tablesorter - mouseover column headings

is there a way to have the mouseover with a hand when you go over the column heading so its clear that you can click on the column heading to sort the table by that column ...

jQuery and IE7 layer problems

When using jQuery with internet explorer 7, i cannot get it to display a popup page, the screen goes grey, the popup is there but not highlighted. I have not modified any of the code, so i know i have not messed it up anywhere. When i run the page using safari or mozilla, everything is ok, even ie8 display's the page, but ie7 is givi...

Is there any plugin which expands image such as thumbnail image to some large size?

I have search result which includes images. When the user hover over the image the image should expand somewhat large size like we see on bing image search. Is there any Plugin for that. Please help. Any Suggestion will be appreciated. ...

Creating a custom jQuery countdown table.

Hi guys, before you reply or downvote - I'm not asking for somone to code this for me, I just want a bit of advice and guidance. Basically, I started learning jquery last week and for my first project I want to make a countdown table. e.g. ===================== Time|Desc --------------------- 1.03|Item 1 --------------------- 0.50|Item...

Upload File Validation using jQuery Forms in ASP.NET MVC

Hi, I am working on some ASP.NET MVC code which makes use of the jQuery Forms plug-in to allow users to upload files. The Form: <% using (Html.BeginForm("SaveAttachments", "Data", FormMethod.Post, new { enctype = "multipart/form-data", id="SaveAttachments" })) {%> <input type="file" name="consentform" size=30/> <input ...

jQuery popup not working in IE7

I'm using the following to create a popup layer so user can enter information : /* * Guidelines to use this js file * 1. do not change function doBubblePopUp * 2. add specific task for your module in doModuleSpecificTask * 3. write appropriate module function defined in 2 * 4. for form submission use document ready for submit, chec...

jQuery Plugin Authoring: Cannot get basic example to work?

Hi all, I'm trying to write a few plugins for jQuery, so as a starting point I went for the basic example shown in the documentation (here). This is the code I have, in a js file called jquery.test.js: (function($) { $.fn.myPlugin = function(settings) { var config = {'foo': 'bar'}; if (settings) $.extend(config, settings...

Microsoft's AJAX Toolkit vs. jQuery

Our team has been using Microsoft's AJAX Toolkit since the days of Atlas. In a bit of naivety we missed the jQuery/Prototype phenomenon until a month or two back. Until now, we have always associated the concept of Ajax with Microsoft's toolkit. In reading up on jQuery I'm seeing a whole new side of Ajax that I was only vaguely aware ...

jQuery : Append text after an input field

I have a simple input field : <input type="text" id="someid" name="somename" class="someclass"> I'm trying to append some link right after this; so i'll get : <input type="text" id="someid" name="somename" class="someclass"> - <a href="#">..</a> i tried : $("input#someid.someclass").append(' - <a href="#">Are you sure ?</a>'); ...

Does anyone know why the first method fails when testing for a selected item in a drop-down?

I have a 'select' drop-down with a list of players' names, which by default has the first item--also an empty item, selected. I would like to do a simple test on whether this item is selected when the user clicks a button below. I came across two possible solutions: 1) if( $("#players option:selected").is(":eq(0)") ) { alert("Plea...

highlighted current page not going current page

Hi I have a piece of code that removes and add class 'selected' when the link is clicked on the navigation. The problem I have is that when you click the link it doesn't actually go to the page. Can any anyone help? $(document).ready(function () { $("li:first").addClass("selected"); $("li:last").addClass("last"); $("#n...