jquery

How to bind function to DOM events once and only once so that they will not execute for a second time in the triggering of event?

so I have anchor tags in the form of <a href='[link'] rel='Tab'> and I apply the following at page load:('document ready' I mean) jQuery("a[rel*=Tab]").click(function(e) { e.preventDefault();//then I do some stuff to open it in jq ui tab} now the problem is that when I do this and later through javascript new links a...

Stair Stepper Drop Down

We're developing a new site and we added some list drop downs. The client looked at it on his Dell running Windows 7 and IE8. Unfortunately, it's doing an odd stair stepper effect with the lists when they drop down instead of going straight down like they should. I don't know whats going on. Here's the site Love-Wise. Thanks :) ...

:nth-child is not working in IE

Hey guys Ive searched for my specific problem and can't find it... I hope any of you guys can help. Im trying to get nth-child to work in IE - now Ive read that you can do it with Jquery, how do I implement jquery in this instance? Im also using this Lib item ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js It works perfectly i...

Bug with JQuery Modal Centering

I know there's been a few posts about centering a modal box div using JQuery but I have looked and looked for a solution to my problem, and I have my suspicions on what is going wrong but nothing I've tried seems to have solved it. I have a photo gallery, I click on an image, it grabs the path to the image when it is clicked on and chuc...

How do I round a set of numbers while ensuring the total adds to 1

Hi, I'm looking for a way to round a set of numbers to the nearest rational number while still preserving the total of the set. I want to distribute the total value of '1' amongst a variable number of fields without allowing irrational numbers. So say I want to distribute the total across three fields. I don't want each value to be 0....

Let users draw a line (arrow) on a div/img

Using the jQuery plugin: imgareaselect (http://odyniec.net/projects/imgareaselect/), I let users select areas of an image to add comments (just like flickr). I'm aiming to let users draw arrows pointing on specific image areas instead of drawing boxes. Any idea if (and how) I can modify imgareaselect to draw lines (with an arrow head) i...

JQuery theme builder CSS issue

For some reason the hover attribute is not working. When i put my mouse over the button, it doesn't change to the color I specified in the CSS. Here's my relevant CSS: .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #dadada; background: #d7dfff url(images/ui-bg_highlight-...

Jquery inside Iframe

Long time lurker of stackoverflow and just trying something with iframes and jquery which I couldn't figure out an answer for. I have jquery location in the main page but not inside the frame, in my iframe I have the usual $(document) jquery. Unfortunately I get this error in firebug "$ is not defined" Is there a way to get around t...

ASP.NET MVC 2 + jQuery lightbox + login

I'm trying to find an example of how to convert the standard login framework that ships with ASP .NET MVC 2 (the account controllers and views, etc) into a modal login dialog system, like the one at Digg. After searching for hours, the closest tutorial I found was this: http://www.weirdlover.com/2010/05/20/mvc-render-partial-modal-pop...

Could you recommend some jQuery/Javascript plugins that handles picture upload/delete/modify?

I'm looking for a plugin of this kind. ...

jquery theme builder question

The button I created from the JQuery theme builder is too big. How can I resize the button and text while keeping everything in the same proportion? Here is the button CSS: .ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: ...

jquery save the id of ajax call to use it in the return function

i have this code to populate the option in my select box(i have 7 select box in this page) with json response from the server(ajax) for (j=1; j <= 7; j++){ $.getJSON('mobile_json.php', {id:j}, function(data) { var select = $('#userAccess' + j); var options = select.attr('options...

javascript youtube like slider control

Hi - I've a question about implementing a slider control in a browser. I need to playback data over time, in a browser. I will have one Worker filling the playback buffer by making calls to a REST api. The UI thread will then consume the buffer and playback the data to the user. I want to simulate youtube progress UI control. It shows ...

jquery : wait until all ajax calls finish then continue

I have some ajax calls in my document.ready() like : for (j=1; j <= 7; j++){ (function(index) { $.getJSON('my.php', {id:index}, function(data) { $.each(data, function(index2, array){ ........ }); }); })(j) } //DO NOT CONTINUE UNTIL FINISH AJAX CALLS ........ MORE JQUERY CODE ...

How to get Ajax working with Jquery?

Hello everyone, this is my first time really using this site. I'm relatively new to using ajax with my sites and I ran into a problem a little while ago. The thing is, I'm not sure what my problem is exactly because every time I went over my script, it made sense to me (and it fit with everything I looked up on Google and the jQuery web...

Make Text Stretch 100%

So, I said this might be possible to my client, and i said I'd research it and let him know. Anyways, with JS or a CSS hack, is it possible to make text stretch 100% of the window? What i mean by this is, how can I make the title of his site, no matter the window size, fit exactly 100% inside the window by dynamically changing the font s...

How to slide in a div when you select a radio button with jquery

I am planning a following html output with PHP. Now when I select week, I want to slide in week div, selecting day,day div etc. How can I do it with jquery. <div id="main"> <form> <div id="week_day_time"> <input type="radio" name="week_day_time" value="week" />Week<br /> <input type="radio" name="week_day_time" value="day" />Day<br /...

Possible to create custom "DOMs" by loading HTML from string in Javascript?

I'm trying to parse HTML in the browser. The browser receives 2 HTML files as strings, eg. HTML1 and HTML2. I now need to parse these "documents" just as one would parse the current document. This is why I was wondering if it is possible to create custom documents based on these HTML strings (these strings are provided by the server or...

jQuery: selectors with OR condition

I've got following code: $('table.tableElements thead|tbody tr').children().hover(function(){ // How can I do this ↑ }); I'd like to catch all tr's of thead OR tbody but not tfoot. How can I do this? ...

jCarousel images not displaying in jQuery slider

I have a jQuery sliding panel that is not displaying a jQuery carousel within it. Example: http://www.warface.co.uk/clients/warface.co.uk/ Click Show Dashboard to display the Sliding Panel. I have the buttons (previous/next) displaying but not the carousel. I have added the carousel below also for example. I have the CSS for the slid...