jquery

refresh an image inside a jquery dialog box

I have a jquery dialog box that opens by means of a link. I would like it so that everytime I open the dialog box the image is refreshed. I tried something like this: function open_dialog() { $("#imageThumbBox").dialog('destroy'); $("#imageThumbBox").dialog({ autoOpen: false, closeOnEscape: true, resizable: true, h...

jQuery UI resizable not working at all

Ok here is the problem. jQuery Resizable just does not work on this page: click here Try it out on the grey box in the upper left corner. What I want to do is make the shoutbox on the right size resizable. But it didn't work so I tried to just copy everything from the jQuery UI example page into my one and try it out. So I added the g...

Is there an jQuery equivalent of MooTools Hash?

I don't think jQuery has a Hash class, so is there an equivalent? I always thought Object does a good job hashing stuff anyway. So what's special about the MooTool's hash besides some of its utility methods? ...

jQuery text truncation (read more style)

Hi There, My question is very similar to "http://stackoverflow.com/questions/2104653/trim-text-to-340-chars" but in jQuery. It sounded very straight forward but when I searched around I couldn't find any reference for it. Ok, I have a div $('#content') I want to trim the text to 'x' amount of characters lets say '600' BUT I don't want ...

Check if the spacebar is being pressed and the mouse is moving at the same time with jQuery?

Is there a way to check if the space bar and at the same time track what direction the mouse is moving and how far etc. Point of this is that I want to replicate how Photoshop scrolls when you hold the space bar, left mouse button and you move the mouse, but without having to hold down the left mouse button. ...

Problem with width and height of an <img> in .animate()

I have a div. Inside the div is another group of divs that each contain an img. I am trying to setup a mouse over that makes the current img expand using .hover() and .animate(). I wanted the code to figure out whether it was a landscape or portrait image then expand it in width or height not to exceed the bounds of the containing div...

Document ready, is there a limit?

I'm working on a templated site which loads a header, footer and dynamic body. I have a class in which I specify what scripts will be loaded depending on the current page, and the user logged in status. I've written a few jquery plugins, and when a page loads I need to call on the plugins via $(document).ready(function() { // $().th...

How to make this stylesheet swicther work with cookie

I found tvanfosson retheme plugin here. I simplified the plugin to suit my need. It works fine. I have a dropdown select list with numerical option values to choose stylesheets. But then I need to set a cookie for each style. The cookie is created, but had trouble to retain the cookie. Here is the modified plugin: ;(function($) { ...

How to use javascript regex to check for "empty" form fields?

Hi All: I am working on a php+javascript based project and have already made up a mockup page at : my website I knew how to use javascript or php to check whether a particular field of form is "empty"or not, that is, whether it contains alphanumerical characters other than whitepsace characters(for instance, space, tab and newline). H...

Help With jQuery DatePicker

Here is how I am setting DatePicker in js: $('#created_at, #updated_at').datepicker('option', 'dateFormat', 'dd.mm.yy 00:00:00'); What I am trying to achieve is for DatePicker to display date in a format like this: 12.02.2010 00:00:00 So basically just add "00:00:00" string after the date. B...

using a simple jquery script to have a div follow the page on scroll

I'm trying to use this script here: http://css-tricks.com/scrollfollow-sidebar/ to make a simple div that follows the window as the user scrolls. I changed it from 0 to topPadding and changed topPadding to topPadding*2 to get the right top offset. Unfortunately this has the side effect of the object making the page a little longer and a...

select first li in multiple unorganized lists with jquery

Hello! Problem demo is here: http://www.studioimbrue.com Currently, when the page loads, all the thumbnails are triggered to dim. I'm trying to make it so that each first thumb remains at full opacity (using :first of course) until another thumb is clicked. I can get it to do it for the first one, but it won't iterate to each . I tried...

Anyone know a good Javascript Prompt for the User to upgrade their browser...

I am trying to find a good way to notify visitors to our site to upgrade from IE6 to get full functionality. I see lots of this in use. Anyone know a good source for it? ...

How to update the cookie value using Jqury?I dont want to update the cookie expire time?

I have the cookie for delete Option.But wheen the user undo the i want to upadte the cookie.The cookie when created its expire is 5 min. ...

Internet Explorer jquery :contains issue

I'm trying to parse a simple xml document with jQuery. Does anyone know why the following works fine in Chrome and Firefox but not in Internet Explorer (7 and 8)? var selBunit = $("#bunit").val(); $(bunitXml).find('bunit bname:contains('+selBunit+')').parent().find('team') Below is a snippet of the xml. So basically I'm trying to retu...

How to make WebAii test wait for jQuery animation to complete?

How can I write a Visual Studio WebAii Test that waits for a jQuery animate operation to complete before continuing? Currently I'm just pausing for 5 seconds using a loop, but this is prone to breaking easily if the animation time changes. I've tried some wait methods in the WebAii API but none of them seem to wait for that kind of thi...

jquery jeditable and multiple fields

I'm pretty new to Jeditable and I was wondering if there is a way to generate and submit a custom form with multiple fields instead of just one field? I've taken a look at this tutorial for some hints and I've made a bit of progress. I'm not sure if I'm on the right track though. ...

How to determine if it is day or night in javascript or jquery?

Hi guys, Im wanting to apply different CSS sheets to my site depending on the time of the browser. e.g if its day time, display day.css or night.css for night. I can do this with PHP but it is based on the server time, not the browsers local time. Is there a way to tell the time in javascript? I'm probably going to use jQuery to simpl...

Good Jquery Autocomplete plugin consuming JSON ...

I have my customers name in json format i have to use it in a textbox such that it auto completes to give list of users ... Any good Jquery Autocomplete plugin consuming JSON.. I have gone through a similar question of stackoverflow but it didnt help me http://stackoverflow.com/questions/188442/whats-a-good-ajax-autocomplete-plugin-fo...

How to make a lightweight scrolling menu

I want to make a scrolling menu just like this site : http://www.dsebd.org/, the menu which is scrolling horizontally from right to left. This menu needs to be updated, say, every 20 or 30 seconds. I want to make this menu as light as possible. I was thinking about using jquery, but since I am a beginner I don't know how to use it, or e...