jquery

jQuery selective hover

Hello everyone, I'm trying to do a simple task with jQuery: I have a list of words which, when hovered, should fadeIn its corresponding image. For example: <a href="#" class="yellow">Yellow</a> <a href="#" class="blue">Blue</a> <a href="#" class="green">Green</a> <img src="yellow.jpg" class="yellow"> <img src="blue.jpg" class="blue"> ...

HTML Upload Form will only upload files found in the directory of the PHP file.

I have an image uploader that uses the imgur.com API and jQuery's .ajax() function to upload images to their servers. However, if I browse for an image using the <input type="file"/> element of the form, it will only be successful in uploading an image if the image file is found in the same directory as the page.php file that the form is...

jsTree: icon changes on mouseover in chrome, it shouldn't

If anyone has used jsTree in chrome and had a similar issue please let me know. It doesn't break in IE (first time for everything) nor in FF. Basically, when I mouse over an icon it changes, but not with any regularity, some times I mouse out and stays the same (incorrect) and when I mouse over it again it changes correctly. I'm using ...

Dynamic instant theming a la My Yahoo / iGoogle

I can think of lots of ways to do this on my own, but I was hoping to find some sort of best practice and have been having trouble finding other's experiences. I want to create easily themed HTML and provide a real-time selector for the user to experiment with themes. I want to do something like the "Change Appearance" tab at http://my...

How can I get my div id to reload via ajax and jquery

I'm creating a CMS using jQuery and AJAX. When I click, my "Add Campaign" buttom, it creates a unique client ID in the DB and on a hard reload, the new client shows up in its container. I am trying to use ajax to reload the container on the fly and I'm not having the exact luck i am hoping for. I can get it to reload, but it's like it'...

How can I hide the label created by jQuery Validator ?

I am currently applying a simple simple to my validated forms (red background and border) although jQuery validator appends some label with : Field is required. I just dont want any text to appear. Thankyou! ...

How do I make nested options for plugins in jQuery

I know how to do plugins, but how do I do nested options like: var defaults = { spacing:10, shorten_to:50, from_start:0, from_end:2, classes: { test:'testing' } }; i know that isn't right, i just dont know how to write the proper syntax when I want to do something like this: $('#breadcrumbs').breadcrum...

Transforming highlighted text inside an element using javascript

My goal is to be able to get the highlighted text within a document, but only if that text is within a given section, and then apply a certain style to that selected text after clicking a div tag. I'll explain what I mean: So, having looked at window.getSelection() and document.selection.createRange().text, I attempted to use elmnt.get...

jQuery Draggables and Droppables Positioning

I'm using jquery UI and jQuery draggable, all my draggables use jquery clone helper and appends the draggable to droppable. $('#squeezePage #droppable').droppable({ tolerance: 'fit', accept: '#squeezeWidgets .squeezeWidget', drop: function(event, ui) { var dropElem = ui.draggable.html(); var clone = $(dropElem).clone(); ...

jquery animate and image resize flickering

Hi, i've a problem with a resize effect that i've done in http://www.mcz-scenario.it. When you click on a language, you can see the "background" image transferring into a certain position of the screen. this is the image: <img id="lago" src="http://www.mcz-scenario.it/images/lago.jpg" height="1070" width="1600" alt="lago" /> And this...

jquery toggle and fade in one function?

I was wondering if toggle() and fadeIn() could be used in one function... i got this to work, but it only fades in after the second click... not on first click of the toggle. $(document).ready(function() { $('#business-blue').hide(); $('a#biz-blue').click(function() { $('#business-blue').toggle().fadeIn('slow'); return fal...

Delete a div id using ajax and jquery and delete from DB

I've got several div id's, each containing a different client. I want to be able to click the delete button and using ajax and jquery delete the specific div from the database. I'm getting success in AJAX but it's not deleting anything from the DB. And then obviously, upon deletion, I would like the container to reload dynamically. help...

Show/hide jQuery

Not much experience with JavaScript, hopefully one of you gurus can help. <div id="themes"> <h2>Research Themes</h2> <ul> <li><a href="">Learn about our approach to the <strong>environment</strong></a><span><a href="#">Expand</a></span></li> <ul class="tier_2 hide"> ...

How to pause a setTimeout call ?

Im using jQuery and working on a notification system for my site. The notifications automatically fadeout using the setTimeout function. How can i stop the timer of the setTimeout call? For example i would like to pause the setTimeout call while the mouse is over the notification and continue the count down mouseout... I googled "paus...

asp.net mvc2 microsoftMvcJqueryValidation - Include my custom client-side function

Hi there I'm using microsoftMvcJqueryValidation and I want to call my own client-side validation function for a particular field with the system so that it fires with the other auto generated client-side validation. Is there a certain place I can call my function? Thanks~! ...

How do I take input/output from a form and store it in a JS variable?

I am creating the UI of a web app, and haven't done any back-end work yet. For testing purposes, I want my forms to be able to work, so I want to take the input they have received and store it in javascript variables so I can access them, using jQuery. Everything I have looked at, tells me how to pass js variables into the form, not th...

jQuery Cycle multi slideshows and independent keyboard navigation.

I have a page with 2 (or more) jQuery tabs. Each tab contains a jQuery Cycle slideshow with prev/next paging appended in the code. I've added keyboard navigation of the slideshows, based on a tutorial at jqueryfordesigners dot com. Keyboard nav works for each slideshow but the slides page in synchrony, i.e. if paging to the 3rd slide ...

Am I crazy? (How) should I create a jQuery content editor?

Ok, so I created a CMS mainly aimed at Primary Schools. It's getting fairly popular in New Zealand but the one thing I hate with a passion is the largely bad quality of in browser WYSIWYG editors. I've been using KTML (made by InterAKT which was purchased by Adobe a few years ago). In my opinion this editor does a lot of great things (im...

How to embed multiple jQuery line of code in custom HtmlHelpers ASP.NET MVC

I 've tried to create my own HTML Helper which work fine for my need but I can't embed many lines of jQuery code in my extension HtmlHelpers class. I've tried @ literal for jQuery code I doesn't work or I need to escape every line of code that I thing I not good for multiple line of code. I don't know if there is another way to achieve t...

jQuery to populate array-named form fields based on first entered value where number of fields is unknown

Greetings, I have a form with a variable number of inputs, a simplified version of which looks like this: <form> <label for="same">all the same as first?</label> <input id="same" name="same" type="checkbox" /> <input type="text" id="foo[1]" name="foo[1]" value="" /> <input type="text" id="foo[2]" name="foo[2]" value="" /> <input type="...