jquery

Why jQuery is called jQuery? What is the name reason?

I know j in jQuery stands for JavaScript but what about query in jQuery ? What does that stand for ? ...

copy events from one elm to other using jquery

==dom is like this== <a href='javascript:void(0)' id='link1'>elm with events bound initially</a> <a href='javascript:void(0)' id='link2'>elm to which events are bound in future</a> ====js== $(function(){ $('#link1').bind('click',function(){alert('do something to make me happy');}) }); //now some time in ...

Problem loading scripts from Ajax Response

The problem is I am using get_info() to make a ajax call to Result.lasso and paste the response in div with id 'test'.I am unable to use the sendForm() function from the page where i am calling the get_info(). I have also tried using different versions of jQuery 1.1.1.3 is working fine.But i am facing the problem while using higher vers...

Modal Registration Box using ExpressionEnine and jQuery

I'd like to create a modal style registration/login box for my ExpressionEngine site. What's the best way to handle registration on a modal box? Should I call a registration page using an iframe. Are there security concerns? ...

Find html element nearest to position (relative or absolute)

Given absolute or relative position (top & left) is there any way to get the nearest html element to these co-ordinates? Or alternately, is there any way to craft a selector (or use some jQuery construct) to enumerate elements and then find which is closes to the provided co-ordinates? Assume that the set of elements is small and finite...

Jquery Regex Matching

I'm trying to find a quick and easy way to validate some inputs with jquery. I just need to make sure that a field excepts only numerical values and only 4 integers long, basically a year. I want to do this with jquery and can't find just a simple solution. I'm guessing you use filter? $(document).ready(function() $(input#year).fil...

Debugging AJAX caching in ASP.NET MVC

Hello, I have a simple proof of concept that seems to be handling caching oddly. Here's the view: <script> $('#clickToLoad').click(function() { $.ajax({ url: "<%=ResolveUrl("~/Home/AjaxCacheTest") %>?" , dataType: 'json' ,ifModified: true ,cache: true ,success: function(sourceD...

Combine JQuery client side errors and ASP.NET server side errors in the same summary

I am using JQuery for all of my client side validation and Asp.net validator controls for all of my server side validation. I am using an errorlabelcontainer to store the client side validations in a summary at the top of the page, which is the requirement. All works well. My problem is, I want to display the server side asp.net error...

Screen Coordinates of a element, via Javascript

I'm trying to get the screen coordinates (that is, relative to the top left corner of the screen) of an element in a browser window. It's easy to get the size and position of the window (screenX, screenY) and it's easy (with jQuery) to get the offset of the element ($('element').offset().left). However, I need to know how many pixels it...

ajax and jquery to load content

http://www.yensdesign.com/tutorials/contentajax/ In this tutorial, we see that the content of the page that is loaded by ajax slides up and slides down, but i want the content relating to the old link to slide up and content of new link to slide down.. could you please tell how to do that.. Thank you, Raj ...

How to add new form fields using jQuery and $form helper?

Hi all, I'm trying to let a user to do a 'Click here to add more info' link. I'm trying to do this with input fields so that the id of the field have to increment. I would like for jQuery to add this on every click where $i is the number of each field incremented: <div id="info"></div> <?php echo $form->input("User.$i.first_name"); ?>...

Use greek with JSON

This is a JSON I'm writing and use it with JQuery. bookData.webSites = [ { id: 1, title: "ΤΟΥΡΙΣΤΙΚΗ ΑΝΑΠΤΥΞΗ", image: 'images/books/min.png', site: 'http://delicious.com/', author: "", pages: '', isbn: '', price: '', type: 'book' }]; It works perfect unt...

jQuery image hover not working on Firefox, when I uploaded files to online server.

It was working fine on Firefox on local machine but when I uploaded the files online it just stopped animating and showing a static image. View it here The Javascript I am using: <script type="text/javascript"> $(document).ready(function() { $("ul.gallery li").hover(function() { //On hover... var thumbOver = $(this).find("img")....

Inpupt box animation in jQuery leaves a "trail", any way to get rid of it?

Using jQuery to animate a ASP.net textbox when it's focused leaves a trailing animation in Firefox 3.5. The effect can be seen here or here with .stop() added, both exhibit the effect. The effect is no longer visible after modifying the input box to have no border, this can be seen here. The top box has no border and has no trailing...

jQuery keypress event is giving odd charachters

I have made following code, but whatever I type it will always print some odd char. $(document).keypress(function(event) { var character = String.fromCharCode(event.keyCode); $("body").append(character); event.preventDefault(); return false; }); ...

How can I set the Name attribute of an input field using Jquery?

Hey guys, Quick question... I was wondering how I can get this to happen. Okay I have an input field like such: <input type="text" id="input1" size="10" name="" value="" class="checked other_amount" onfocus="Toggle('radio1', 'input1');" /> I would like to click on a div with an ID of #resetPrompt and fill the empty name attr from th...

Javascript: How to make this var. work globally.

I am having an issue with this variable not wanting to work outside the function and I just can't understand why! here's the code: globalData = new Array(); // // Colors // if ( settings.category == 'colors' ) { $.getJSON(colorLoversURL, function(data) { for ( var i in data ) { var localData = data[i].hex; globalData...

jquery ajax and google chrome

$(document).ready(function(){ $("#home_tab").click(function(){ $("#content").hide(); $("#content").load("php/media_body.php"); $("#content").show("slow"); }); I'm using the jquery ajax library to pull some html content from a php file on my server. The above code works beautifully in IE and Firefox but...

Jquery Cycle Plugin Question - turning off relative links to photos so it goes to a URL

I am using Jquery Cycle Plugin and it has a side panel that highlights as the photos change and currently when I click on the text the associated photo pulls up then I have to click on the photo to go to the URL but I would like the text itself to link to the URL. I have looked at the fn.cycle.defaults but not sure what to change and I t...

Select element based on EXACT text contents

I have a list of divs that all contain a p tag classed as index. The textual content of these p tags is a number from 1 to n (although probably no more than maybe 30-40). I had the following selector, which worked fine in preliminary testing: var ad = $('.existing_ad .index:contains('+index+')').parents('.existing_ad'); Where index is...