jquery

jQuery drag/droppable scope issue

See the code here on jsbin. I'm basically trying to create a series of switches. Each filled red square can be dragged up and down. The red outlines on the bottom are drop zones. When a square is dragged over a drop zone that is eligible to accept it the drop zone should turn pink. There are two problems with this code. One is that whil...

For textbox/textarea limit the length of input on typing, but not on paste.

Hello. I got a strange requirement: function TextLimit(elem, maxChars) { ... } Where elem is a textarea or input of type=text and maxChars is the maximum number of characters that could go into the elem. The code inside the function must limit the length of the text inside elem to maxChars when the user is typing. However, if the us...

Resizing Page Elements based on Window size

Problem: My Client wants me to create a launch webpage for his product such that there should be no scroll on the page, be any browser or window dimensions. Doubt: Is this possible using CSS and Javascript? Some Early Diagnosis: This might be a little similar to this or this but the difference is that I want to resize the dimensions of...

jquery hover only to work if hovering for a certain amount of time

In a list of links, I only want to activate the hover behavior for those links after the person is hovering over that link for a certain amount of time (say 1 second). So if they happen to just pass over the link (for less than one second) I don't want the hover event to occur. Does anyone know how to do this or have any examples of th...

Using a dynamic variable within a for statement

I would like to dynamically create and reference some variables on the fly, but i'm not understanding how to. Here is what I would think 'should' work, but I know doesn't. var weeks = 4; for(i=0; i<weeks.length;i++){ var 'week_'+i = valueFromXML; } function wtFn (){ 'week_'+i.splice(-1, 1); if('week_'+i.length <=0){ $(thi...

google chrome & maybe others weird layout issue

Hi, I am using a jquery plugin called masonry. In IE & firefox, the site works as it's supposed to. However, in google chrome, the layout elements get stacked on one another. If I click the menu items on the left, then the plugin reloads and the site looks like it's supposed to. So, I think it must be a timing issue. Any thoughts on h...

Slide instead of Fade for a div

This could be a simple thing im sure... Im trying to get the fade to slide: $slides.eq($btns.index(this)).fadeIn().siblings().hide(); At the moment it works great with fade, i just need this line tweaked to slide, ive done the obvious but i must be doing something with the syntax as it doesnt work. Cheers in advance! //added var $b...

Fill available spaces between labels with dots or hyphens

Hello everyone, I have a page with labels which are contained in a div, the labels has a variable with and i want to fill spaces between both with characters, dots or '-'. For example. My label text 1 ----------- Some Text Here. My text 2 ----------------------- Another Text. If you notice both text are justified (or at least i tr...

jQuery UI Dialog positioning

Basically I would like the dialog to remain centered when resizing the window (or switching to full screen window). Also the dialog is draggable, and ideally I'd prefer if it remained in it's dragged position on the page when resizing the window. But if it resets back to the center then I would settle for that too. I tried setting "pos...

Implementing jQuery AJAX calls in an ASP.NET MVC site

I'm building an ASP.NET MVC site where I want to implement jQuery AJAX calls in some places. I've read up on the subject, but still have a few questions. Model Binding First of all, what is the correct way to pass data through the AJAX calls and have it be model-binded into an object inside my Controller Action? So far, I've read in...

How to run a jQuery function after all and any other javascript has run

hey guys, I have a photo gallery page hosted on a CMS (Squarespace) which has some of it's own scripts which load the thumbnails asynchronously. The actual large images however are not preloaded, so I decided to add my own script into the mix to just make the browser load those larger images into the cache in the background, like this:...

How can I change this to sort by time too?

Hi I want to sort by Month Day Year Hour Minute PM/AM (MM/dd/yyyy h mm tt) I want to change this what does dd/mm/yy However I am not sure how to do this jQuery.fn.dataTableExt.oSort['uk_date-asc'] = function(a,b) { var ukDatea = a.split('/'); var ukDateb = b.split('/'); var x = (ukDatea[2] + ukDatea[1] + ukDatea[0]) * ...

How to use jquery to create progress bar for loading an image?

I want to take size in bytes of image in page at the first load page, and then create a loading bar and show it loading similar preloader of flash. But I don't know if jQuery can take size in bytes of image or not. ...

jQuery Dialog Opening but not Closing!

I'm doing an Ajax GET for some HTML which then populates a div via: $(theDiv).html(theHtml) This HTML includes a button (let's say "Button A") that displays a jQuery dialog via: $(selector).dialog({modal:true}); When "Button A" is clicked, the dialog shows up every time. However, inside the dialog, I've included a Cancel link. ...

using jquery .find() to get children

I have the following markup: <div id="items"> <div class="item"> <div class="item_box" id="id_1"> <div class="one" id="one"></div> </div> </div> <div class="item"> <div class="item_box" id="id_2"> <div class="one" id="two"></div> </div> </div> <div class="item"> <div class="item_bo...

Autofill a username and password

I would like to be able to click a link in Website A that will autofill a username and password into Website B. Can anybody provide me some ideas how to do this with JavaScript or PHP? Many thanks! ...

jquery file tree - folder open by default?

Hi all, I was wondering if anyone could help me out with jQuery file tree (jQuery File Tree) I was wondering if/how it would be possible to set some kind of variable that will tell the file tree to have a certain folder open on load. (eg. folder /images/fruit/ to be open by default) Here's the code to call the filetree: $('#container_...

how to read rss feed to gae-database .

any gae-lib to do this i think maybe jquery can do this too , yes ? thanks ...

Do I use jQuery noconflict to avoid plugins conflict?

UPDATE: I've found that the jquery.bxslider plugin itself clones and appends/prepends the LIs causing the trouble. No solution to this though, except maybe using another script :( I'm having to jQuery plugins partially conflicting with each other, Boxslider (an image slider) and Colorbox (a lightbox). They both work, but the slider ...

jQuery fadeIn doesn't work in IE.

I'm using fadeIn to fade in my BG DIV's. example: http://commonmovement.com/MIP/about-mip.html This works in all browsers except IE, where it just "pops" on. Not sure how to fix this. I tried using: $('#main.about_main').css('filter', 'alpha(opacity=0)'); $('#main.about_main').fadeIn(2000); but no luck. CSS: #main { height:10...