jquery

jQuery: how do I get the element underneath my cursor?

I'm making a drag and drop action, and I want an element to shift down when I bring an element over the one that is in my way. ...

Google Maps API sometimes not returning PostalCode within AddressDetails

I created a function to take location input, pass it to Google Maps Javascript API V2, and return a latitude/longitude/normalized address that I'll have to split into different fields in a database (i.e. city, state, postal). I'm requiring at least a level 5/post code accuracy for the input so that the returned data from Google will alw...

Event on Keypress

This function returns to the thumbnail view when clicked on the enlarged image.... $('#wrapper > img').live('click',function(){ $this = $(this); $('#description').empty().hide(); $('#thumbsWrapper').css('z-index','10') .stop() .animate({'height':'100%'},speed,function(){ var $theWrapper = $(this); $(...

JQuery children element set event

Im trying to create an event for each (a) element in a list (ul). But im doing something wrong function EnableAjaxOnMenu(ElementID, TagName) { var elm = jQuery("#" + ElementID).children(TagName).click(function () { GetPageByUrl(jQuery(this).attr("href")); //ChangeSelectedMenuItem(this); return false; })...

Using jQuery-UI Position utility with show/hide seems to cause random offsets

I'm trying to take advantage of jQuery-UI Position's ability to handle collisions when I popup a little menu if a user clicks a button. Essentially, if they've scrolled somewhere on the screen, and the menu will fit above the button but not below, it automatically "flips" the menu up. This seems to be really easy and super elegant: $(...

jQuery: how do I sort a list where each item is from a different section?

Ideally, this would be draggable, and you'd be able to drag stuff from one section into the other. Ideas? ...

dynamic shortened text areas with "See more" link

I need to add text areas to my website with the following charateristics: Only the first 2 lines should be visible with a "See more" link. When the user clicks on see more the remaining text is displayed without page refresh... It should be similar to Facebook "See more" functionality, showing the complete comments content, if these ...

Problem passing integer variable into click event in javascript and jquery

This is probably something simple but it's driving me nuts. I'm making some pagination using jquery and a while loop which has a variable called "pageNum" that updates at the end of the loop and represents the page being written out. Obviously pageNum is added to at the end of each iteration. Fine. Here's the code that's giving me a ha...

JQuery UI, Combining Sortable with Droppable

Hello! I am trying to combine JQuery UI sortable with droppable to create multiple pages for dropping and sorting things. I have setup a standalone demo: http://whit.info/dev/sortdrop/ and here is a jsFiddle: http://jsfiddle.net/VUuyx/ Note that you can drag to sort the boxes, even into other columns. You can also click the page but...

Seeking advice on js library for building a dynamic form generator.

Hi- Today, I'm building a little form generator for my firm. It would ask for someone to Add a Field, choose the field type (text field, checkbox, etc), name it and then add another and another if they want. I'd like to achieve this without having to go server side for each element. In other words, I want to take this opportunity to b...

JavaScript: pass arguments to onclick handler.

I need to pass extra arguments to onclick handler. I can't decide which way is "better": EDIT: Context: I have a table that shows roster of an event. Each row has a 'delete' button. What is a better way to pass recordId to the delete-handler? $('a.button').click(function() { var recordId = $(this).metadata().recordId; console.l...

JQuery, Filter by User Selection? Range?

How can I filter my selector by what the user has selected??? I'm trying to find specific elements inside what the user has highlighted. $('.item', document.selection) ? $('.item', editor.getSelection().getRanges()[0]) ? ...

jQuery qtip() - how to get the id from the clicked item

Hi everyone, I have the jQuery qtip() function in my asp.net page and I need to get the id from the clicked item. Does anyone know how to do it? As an example, please find below my script code... $("#content a.toolTip").qtip({   content: { url: 'PageView.aspx?Param=' + '---get id---' } )}; Thanks in advance. []'rpg ...

How to create a jQuery function to return a bool?

How can I create a jQuery function like $.MyFunction(/*optional parameter*/)? which will return a bool? note: I've tried this: jQuery.fn.isValidRequest = function (options) { return true; } // I'm contending with Prototype, so I have to use this jQuery(document).ready(function ($) { // and jQuery 1.2.6, suppli...

load google maps in javascript file

I want to load google maps dynamically so I only load them when needed but I keep getting the error google is not defined here is my code $(document).ready(function(){ if($('.geotags').length > 0){ $("head").append('<script type="text/javascript" src="http://www.google.com/jsapi?key=keytogooglemapsapi"&gt;&lt;/script&gt;'); ...

jQuery Regex Question - Simple Match

How can I match something using jquery that is set up as such: id="intersection_resources_4_5" // hit id="intersection_content_6_5" // hit id="intersection_content_4_3" // not I want to do something like: $("div:regex(id, intersection_*_*_5)").each(function(){ $(this).click(); }); Is this doable? Assuming, the * is a wildcard,...

jQueryUI selectable: multiple selections

I need to create a 7 day calendar on a website, and I was using jQuery UI's "selectable()" function to allow a user to do something like select 7am to 11am on monday. My problem comes from needing multiple categories of selection, i.e. user can select 7am to 11am for category A, AND also make a separate selection of 5pm to 9pm for categ...

Looking for a good JQuery counter

Hello. I have a website that has members. I want to create a feature that is a real time (with out page load ) counter of how many members are signed in. I have the signed in user in a variable so I'm looking for someway to incorporate it using that. Anyone know of a good plug-in or Jquery script to do this? thanks in advance ...

problem in saving url in jquery/mysql

hey guys im trying to save a url link in a html form but problem is i cant save urls like this : modules.php?name=phpBB3&file=memberlist but the result after using jquery is this url : modules.php?name=phpBB3 i heard i should use json but no idea how to do that ...

JQuery: scrolling animation problem

I've written these 2 JQuery functions which are supposed to take 9 blocks with IDs set from "C1" to "C9" and scroll them upwards until they reach the top and then each block that reaches the top should go back and start again. The strange thing is each time they start over the space between the blocks gets larger until everything gets m...