jquery

Is it possible to obtain a list of events bound to an element in jQuery?

As the question said, i need the list of events bound to a specific element. I mean events like click, mouseover etc bound to that element at the loading of the dom. (Stupid) example: $("#element").click(function() { //stuff }); $("#element").mouseover(function() { //stuff }); $("#element").focus(function() { //stuff }); ...

Google Maps - display/hide marker onclick

Hello! The Problem: I got a Google Map. In my init() Method I set all the Markers to its lon/lat. Now I want to have some checkboxes on my page. In my map I have several Markers for Icecream, Playground and Gasstation. Now, clicking on the checkbox for Playground I want to display all Playground markers. On disabling the Checkbox, I want...

dynamically set width of ul based on combined width of li tags

I'm trying to create a horizontal tab menu. how can i get the combined width of all the li tags and assign the width to the parent UL using jquery? thanks in advance! ...

Loop through a set of ids and copy them...

I have an unordered list with ids like so: <li id="e1">01</li> <li id="e2">02</li> <li id="e3">03</li> <li id="e4" class="event_day">04</li> <li id="e5" class="event_day">05</li> And a div with content like so: <div id="descriptions"> <div></div> <div></div> </div> I want to copy the ids of the list items with the class event_day...

jquery is not getting loaded in my content page ?

I have content page , i am putting this inside it <asp:Content ID="Content2" ContentPlaceHolderID="contentPanel1" runat="server"> <script type ="text/javascript" src ="JScripts/jquery-1.2.6.js"> </script> </asp:Content> The jquery is not loaded , none of the functions of jquery work. i have also tried by putting it ...

Retrieve value of element on dom on page reload

I have the following JavaScript function which is used to keep users from inundating our server with Ajax requests: var validateZip = function () { var lastSuccessful = parseInt(jQuery('#mailingZip').val(), 10); return { validate: function(zip) { var is5DigitNumber = /^\d{5}$/; if (is5DigitNumbe...

JQuery: Specify placement of error messages inline using Metadata and Validate plugins

I'm doing form validation using JQuery with the validate and metadata plugins. I'm using the metadata plugin so I can specify the rules and messages inline in the html form instead of in the javascript in the page . I'm getting an error when I try to specify the location of the error message using errorPlacement. (If I specify it in t...

How do I use the resizable() function of jQuery Ui, to just resize the HEIGHT of the div ?

That's all I need folks, I have 2 divs(a,b) inside another DIV(c). So, the C div is resizable, and when I resize it, the A and B divs are also resized by the option alsoResize. Works pretty fine, but now I need to make the height between the two inside divs (a,b) resizable. For now theirs heights are 50%-%50%, so I want to be abble to re...

JQuery UI Tabs - "Loading..." message

All, I am using Jquery UI nested tabs. I was just wondering if there is any way to display an AJAX Spinner image next to the tab text, while the tab is loading. I do not want to change the tab text to "Loading..". Consider that when multiple tabs are loading at the same time or one after the other, the spinner image should be displayed ...

Triggering domready by force in jQuery?

Since placing javascript DOM methods in the bottom of the html page (after <body>) is a lot faster than using the jQuery 'ready' event, shouldnt we be forcing it by doing: $('document').trigger('ready'); ...after the body tag? I havent really tried this, but it should speed up things. Or did I miss something? ...

call jQuery twice

Hello there .. I want to use jQuery code inside content(div) is already loaded by jQuery .. here is my Example code .. <!-- Slide Panel with Form Adding data --> <div style="display: none;" id="slideAddForm" > <h2>Add Row</h2> from here .. </div> <div class="tabs"> <!-- Tabs --> <ul> <li><a href="#first"> frist</a></li...

How to add option to select list in jquery

My select list is called dropListBuilding. The folliowng code seems to not work: for (var i = 0; i < buildings.length; i++) { var val = buildings[i]; var text = buildings[i]; alert("value of builing at: " + i.toString() + " is: " + val); $("#dropListBuilding").addOption(val, text, false); } This line dies: $("#dr...

AJAX calls from Apache-hosted file to Tomcat servlet on same server failing.

Why are my AJAX requests failing? I have a website www.foo.com, and I'm running Tomcat on the same server, www.foo.com:8080/services. However, when a file on foo.com makes an ajax call as such: $.get("http://foo.com:8080/services/action.do", null, myCallback ); I get an error response, rather than the xml document I get if I manually...

Extracting Query String From eExteranl

Is it possible (and appropriate) to open a new window to an external URL, have my users process a form on that site (which generates a query string with name/value pairs) and then parse the pairs of that query string back to my parent window so the values can be loaded into variables for subsequent use in a form on my site for further pr...

jQuery quicksearch plug-in tinkering with JSON

I've implemented the quicksearch plugin by Rik Lomas and I love it for an application in a custom CMS I'm building. I was wondering though, since I'm going to have a bizillion items in the table if there's a way to use the data from my json callback to populate the table as a user searches rather than the table contents themselves. So...

Adding reverse highlighting to the jQuery image map plugin?

I'm using the jQuery Map Hilighter plugin, but instead of fading a dark patch over each area, I would like to reverse this and instead make the surrounding area dark, keeping the hovered area the same colour. I've looked at the code for the plugin and it appears to use the canvas element (and an MS equivalent I guess) to do the highligh...

Targeting plain text with jQuery

I'm trying to isolate (and then manipulate) quote block formatted in common newsreader and email-client manner. The HTML: <p> Hello there! <br /> I'm great, how are you? <br /> <br /> Someone wrote: <br /> > Greetings, <br /> > How are you? </p> I need to target all the lines that start with >, and hide them as a ...

using jQuery NOT selector to exclude elements with particular children.

I have a function that appends some HTML to an element. It may get called more than once, so I only want it to append the HTML to elements that haven't already had the HTML added. Example: <div class="divToAppendTo"></div> <div class="divToAppendTo"><span class="myAppendedMarkup"></span></div> As such, I'd like to select all .divToAp...

User jQuery to drag a DIV and drop in a TD ... and have the DIV "snap" into place

I am finishing up a rewrite of task management system, and am in the process of adding drag and drop capabilities. I want the user to be able to drag a task DIV from one column (TD) and drop it in another column (TD). I have this working correctly, save for some minor formatting issues. I have the TD with a class called droppable tha...

jQuery redirect not working in non-IE browsers

I'm trying to redirect all links to a particular page on our site to a secure connection using jQuery. This code works fine in IE, but it doesn't work in any other browser (tried it in Chrome, Firefox, and Safari). Any idea why this wouldn't work? $(function() { $(“a[href*=’enroll_now.aspx’]”).attr(“href”, “https://www.[redacted].co...