jquery

Targeting multiple variables in jQuery

I know this is probably a very simple fix. I need to use 2 variables for this function and with the current code it only fires on the first variable. Variables MUST be used for the function in question. var a = $(h1), b = $(h2); $(a, b).hover(function(){ ...stuff happens here }); please DO NOT suggest something lik...

jQuery 'grey' out rest of page apart from div user is hovering on

I am working on a dashboard project where the art director wishes to have an affect similar to the one seen here: http://www.asos.com/ Except when the user hovers over a dashboard 'widget' then there is an overlay over all other elements on the page including the body in much the same way as Colorbox et all. I was thinking of creating...

multiple jquery ui tabs - target one tab from another page

I'm using jQuery tabs on a long home page (scrolling down). The page has 3 sections which each use tabs and the viewer scrolls down to each section. I want to target specific tabs from other pages which works fine if the tabs are at the top of the page. If the tabs are down the page the link opens the correct tab but the page is at the ...

javascript: how to remove element on title

Hi everyone, As the title, how can I remove a div on the html title using javascript or jquery framework? I know it sounds weird but currently I'm working on a CMS template and the generate title has around the title <title><div id="title">Title of the page</div></title> Any help appreciated ...

Why does jQuery slide right or left overshoots the final left position the re-adjust?

I created a hidden DIV panel with form fields in it. I setup an icon on a nav bar on the right side of the page. When clicking on that icon, I perform a show('slide', { direction: right }, 2000). Although the animation starts properly, jQuery overshoots the left boundary then eventually reposition the panel correctly. Why does this happ...

jQuery and Native JavaScript Array - error

var tmpANArray = []; for (var i in associatedPpl) { tmpANArray.push(associatedPpl[i]); } alert('about to call toJSON on AssociatedPpl'); alert(tmpANArray); // the next line fails because $.toJSON is getting fed a function var jsonEncodedAssociatedPpl = $.toJSON(tmpANArray); What part of JavaScript/jQuery am I missing? UPDATE The J...

jQuery slideDown of Ajax return, with div delay

This should be simple. I have ajax returning string, with multiple divs. I need to count each div in the string (so if necessary maybe i have to create an array) and then slideDown each div every x seconds with a little .delay('200');. Please keep in mind the ajax return could be different on each return so it has to work for x amou...

internationalization jquery SlickGrid

It's possible to internationalize the standards formatters and editors on SlickGrid? I need it on English and Spanish languages. Thanks ...

How to refresh an image with Jquery a few seconds after page is loaded

I have a webpage with a php generated image that displays a volume gauge. One of the variables in the php image is retrieved from a micro-controller. The variable is not being updated before the page is generated so the volume is displayed incorrectly. I know the image is not being pulled from the cache because if I refresh the page r...

Checking Permissions on Ajax Requests

Grails 1.3.1 spring-security-core 0.4 jQuery 1.4.x I need to figure out how to check security permissions on ajax requests. For example, I have a calendar displayed in a tab using the FullCalendar jQuery plugin. When I double click a day I display a New Event screen in a new tab. This is done like so: $(tabId).load(contextPath + '/e...

Submit behavior is acting differently when pressing a button compared to pressing enter

I've got this simple login screen where is has a text box for the name, and a submit button. The jquery script running is this: $(document).ready(function() { $('#btnLogin').click( function() { validate() }); $('#loginForm').submit( function() { validate() }); }); function validate() { if ($('#txtLogin').val() != '') { ...

jQuery .each() with string

How do I use jQuery .each() on a string // For Exmaple var mystring = '<div> bleh content </div> <div> bleh content </div>'; $('div', mystring).each(function(e) { alert('do something'); }); // the above code isnt launching an alert for each div in the string? Im not sure why? ...

Advanced search/queue array collection question

I have a pretty large number of objects "usrSession" I store them in my ArrayCollection usrSessionCollection. I'M looking for a function that returns the latest userSessions added with a unique userID. So something like this: 1. search the usrSessionCollection and only return one userSessions per userID. 2. When it has returned x num...

Find value of current line

How can I find the value of the current line of a textarea? I know I have to find the caret position, but then find everything before it up to the last \n and everything after it to the next \n. How can I do this? ...

jQuery.parseJSON not parsing if JSON string has items with the same name

I am playing with the 1.4.1 jquery.parseJSON method and looks like it would be a good fit for my project which is iterating over a JSON string that is loaded from C#. However, the JSON that gets loaded is an entity object and they have generic collections inside of them and thus creates the same name in the JSON string. For example: Th...

Conflict between two jQuery plugins?

Hey, I'm developing a couple of jQuery plugins for a client website that will allow the styling of form elements such as radios, checkboxs and selects. I've been developing them as three separate plugins within the same file, and while the radio and checkbox plugins seem to work fine alongside each other, my select one is giving me troub...

jQuery fadeOut/fadeIn interfereing with jCarousel

I am using fadeOut/fadeIn to fade out a particular DIV and fade in another which contains jCarousel. Once the DIV has faded in, only the first jCarousel Item displays (there are 7 in total), but all other jCarousel elements display correctly. When running jCarousel alone in a separate file, it executes perfectly. Below is the code I am...

Does any jQuery Ajax History plugin work with Chrome?

So far I tried jQuery History http://nix.lv/history/demo.html Ajaxify http://max.jsrhost.com/ajaxify/demo.php jquery history plugin http://www.mikage.to/jquery/jquery_history.html but while they support loading of the desired content using Ajax on page load (so the Ajax content can be "bookmarked"), none of them support the Back bu...

$.getJSON (jQuery) not working in IE 8

There is some straightforward AJAX code that works in Firefox and Chrome but not in IE. I am not doing anything fancy but the code is too long to post here. Essentially, it is: <script type="text/javascript"> var baseurl = 'http://mydomain.com/facebook/'; var setUpGame = function(lvl){ var ajaxurl; ajaxurl = baseurl+'ajax.php?f=gg...

Render multiple partials from one ajax request (asp.net mvc search page)

I have a page with a search bar, facets, and a list of results. I'm trying to figure out how, if the user enters a search or selects a facet (drill down list like categories), to refresh the list of results and facets. I've messed around with templating, such as John Resig's Micro-Templating (which is very cool), but it doesn't allow m...