jquery

Plugging in jQuery HoverIntent for Sliding Panel

I have the following code running to create a dropdown accordion that reveals the hidden div "#top_mailing_hidden" when the div "#top_mailing" is hovered. The problem is that when I interrupt the animation by mousing Out and then mousing Over again it aborts the animation and screws up. I have the following code: //Top Mailing List Dr...

What is the best way to detect IE6 using Javascript?

If browser == IE6{ alert('hi'); } ...

How do I make jQuery Contains case insensitive?

I'm trying to use "contains" case insensitively. I tried using the solution at the following stackoverflow question, but it didn't work: http://stackoverflow.com/questions/187537/is-there-a-case-insensitive-jquery-contains-selector/187557#187557 For convenience, the solution is copied here: jQuery.extend( jQuery.expr[':'], { ...

Export HTML Table to Excel

I have HTML table on the ASP.NET MVC View page. Now I have to export this table to Excel. (1) I have used partial view (Inquiries.ascx) to display the table data from database (using LINQ to Entity) (2) I also have used UITableFilter plugin to filter the records (Ex: http://gregweber.info/projects/demo/flavorzoom.html ) (3) At any po...

jQuery selector $('table td:eq(2) a') get the cell only from the first row.

$('table td:eq(2) a') return the a tag of the third column but only from the first row. Why? ...

Javascript event object is not being populated in event handler function

I have the following code: Html: <tr> <td onclick="ThingClicked()">click me</td> </tr> JS: function ThingClicked(event) { var row = event.currentTarget.parent("tr"); callAnotherDOMManipulatingFunction(row); } For some reason, event.currentTarget is undefined. I tried 'this' but that was undefined aswell. What's going...

jQuery Sanity Check

This is driving me crazy. Please someone tell me I'm not crazy: var constraints = $('.traffic-constraints :input'); console.log(constraints); var i; for (i = 0; i < constraints.length; i++) { if (constraints[i].val() > 0) { //<-------- errorrzz .... the console tells me that i do, in fact, have input objects in my selector (5 of th...

Making events fire in iE6 while <select> is active and dropped down

I am pretty sure this is just a limitation of iE6, but I thought I better ask just incase: <body> <h1>Select + event test</h1> <div> <select> <option>ABC</option> <option>123</option> </select> <span id="eventSrc">Event Source</span> </div> <div id="log"></div> <scr...

JQuery ajax cross domain call and permission issue

I have this polling script to check if a text file is created on the server. Works great locally, but fails when the file is on a different domain. How would i rewrite this for cross domain support? $.ajax({ url: 'http://blah.mydomain.com/test.txt', type: "GET", success: function(result) { //Success! wind...

How to tell onBlur not to hide the submit button when clicked?

My blur event hides the submit button; but doing that seems to cancel the submit event. I only want to hide when the submit itself wasn't clicked. How can I determine if the focus was lost due to the submit, or due to just wandering off elsewhere? <form action="" method="post"> <textarea id="message" name="message"></textarea> ...

iPhone UIWebView stringFromJavaScript with jQuery

I'm looking for a way to include the jQuery javascript library in my project so I can use [myWebView stringByEvaluatingJavaScriptFromString:a jquery command]; This doesn't work: NSString *jQueryPath = [[NSBundle mainBundle]pathForResource:@"jquery-1.4.1" ofType:@"js"]; NSData *jQueryData = [[NSData alloc] initWithContentsOfFile:jQuer...

JqGrid updating grid on add

Scenario: I have three columns in my grid but only one is editable, the other two are filled in on the server side. I am using the built in add functionality of jqGrid and NOT refreshing the grid on successfully add. I would like to have the row added to the grid, like it does automatically, but would like to add it myself because it ...

Firefox (3.6) Selectbox State and Browser Back Button

I have a page that has a selectbox that changes the window.location using hashes to modify the hash state when an option is selected. This allows a user to click forward and back to navigate the different select options. All works well until you click a link to navigate away from the page and then click the browser's back button to attem...

How tell when a hidden field is changed

I have some javascript I want to run when a hidden field is changed (via javascript) Is there any way to do this? (or anyway at all to have a field that is not "visible" in asp mvc that I can get a change event on) NOTE: I have confirmed that it is not the fact that the field that is hidden that is the problem, but the fact the field i...

JQuery - Postion overlay div over another

I am trying to lay one div over another. IE reports "Invalid Argument". Can anyone tell me what I am doing wrong please? var left = $("#container").offset().left; var top = $("#container").offset().top; $("#overlay").css({"left":left + "px", "top":top + "px"}); ...

JQuery: Appending to an element created in another function

I created a div like so: $(document).ready(function() { $(document.createElement("div")).attr("id", "container").appendTo("body"); }); and then later, dynamically I want to append some stuff to it, so in another function I call $(newElement).appendTo("#container"); but it doesn't do anything. The div is still there, bu...

How do I use jQuery in my Greasemonkey Javascript scripts?

I saw a question here and many blog posts about getting jquery into greasemonkey, but I can't get anything to work. Here's my script: // ==UserScript== // @name Hello jQuery // @namespace http://foo.bar // @description jQuery test script // @include * // ==/UserScript== #{contents of jquery.latest.js pasted in} ...

What's the point of 960 Gridder or any grid framework for that matter?

What's the point of 960 Gridder? http://gridder.andreehansson.se/ Is it just useful for laying out websites? I'm not too clear on why exactly these grid frameworks are so beneficial... ...

fixing a jquery horizontal scroller (simple)

hi, I know there are some really pretty carousels out there, but I wanted a very specific one that mimics most flash carousels you see. Here is what is looks like: valums.com/wp-content/uploads/2009/02/menu/final.htm And here is the article: valums.com/scroll-menu-jquery/ Now, if you see my(Gideon) comment on the bottom, theres just ...

Change dragging object and restore it after dropping it.

Hi!, please help me, I know in general how to use the draggable and droppable classes, but I can not find a way to achieve this: I have a large-sized image that I need to drag and drop into a div. 1) while dragging, instead of moving around the large-sized image, I want to use a small-sized image (I already have it, just need to chang...