jquery

jQuery to bind data to ASP.NET DataList using a ashx handler

Using jQuery how do I bind data from a call to a asp.net ashx handler to a datalist? ...

better way of jquery mouseover?

I am trying to create an effect where if you hover over an img, the color of text will change below it. And also, when you mouseout, the color will change back to its original color. The page is: http://vitaminjdesign.com/work.html My code is: if(window.jQuery){jQuery(function(){ (function(){ jQuery('div#one img').bind('mo...

Find the "potential" width of a hidden element

HI all, I'm currently extending the lavalamp plugin to work on dropdown menus but I've encountered a small problem. I need to know the offsetWidth of an element that is hidden. Now clearly this question makes no sense, rather what I'm looking for is the offsetWidth of the element were it not hidden. Is the solution to show it, grab the...

jQuery fadeIn/fadeOut in IE mess the layout

Hi, I have a div which contains multi-columns layout and when I click on a button I want that this div fade out and then clicking on an another button this block would fade in. Simple and it works perfectly on firefox. However when I fade it out inside IE the layout of my columns is modified. It is as if my columns are transformed in n...

Google Maps: Event Listener only remembering final value of variable

I'm putting together a Google Map which contains the locations of various test centres around my country. It plots a marker on each county, and when you click the county marker, it zooms in and gives an overview of the test centres in that county. I'm also using jQuery with this. Here's the problem: When I plot the county markers and c...

scroll multiple divs bound to window scroll event.

hi all, i have the following situation: a div on a page which is displayed as a warning after 10 minutes. after 10 minutes at which point the div is visible it must scroll up and down as the user scrolls the page. Also, i have a user control which can get loaded and be a part of the page which also has a div which scrolls. In a situat...

Recursion limit exceeded

I am using a jQuery Ajax control from this site http://abeautifulsite.net/2008/03/jquery-file-tree/ I have it all working. I tried to ask a support question but never heard back, thinking maybe someone on here can shed some light on the situation. Basically what I am trying to do, is on a file selection run an action that returns a Jso...

Jquery cycle pager with menu tree?

Hello brilliant people! I have gotten lots of help from others posts in the past so I hope you can help me out now. I want to use the jquery cycle with a pager function (http://malsup.com/jquery/cycle/pager3.html) but instead of it generating thumbnails as links I would like the navigation to be text links in an accordion tree like this...

Sending click event to parent anchor

How do I send a click event (JS or JQuery) to a parent object that is an anchor? My basic HTML looks like: <a href="javascript:myFunc(1,2,3)"> <img id="btn1" src="myimg.png"> </a> So I can easily reference the anchor through button via: document.getElementById('btn1').parentNode However, document.getElementById('btn1').parent...

Change contentType when calling jQuery.ajaxSubmit

I have an ASP.NET MVC form that has a standard Submit button it and also a Preview button (so the user can see what an outgoing email will look like prior to actually sending it). The issue I'm running into is that the form allows users to upload files that will be sent with the outgoing email. I would like the Preview button to only g...

Add TM to text with jQuery?

I need a way to go through all the text on my page, including links and other controls and find words that are in a certain list and add the html character entity &trade; () to them. I need this to be fast too. The list is held in a javascript array. I've already got code using .each to find all Links on the page with text from that lis...

Jquery selectors behave oddly

In my html page, I wrote: $('div > input').click(function(){ alert(1); }); my div is like this: <div id="CPE202" class="course"> <input type="checkbox" name="core" value="core" /> Microprocessor programming <input type="radio" name="remove" value="remove" class="remove"/> </div...

JQuery UI: Pros and Cons?

I've recently been working on streamlining my website and leaning up my HTML and Javascript. I've already begun replacing the MS Ajax.Net JavaScript on my site with jQuery JavaScript, and now I'm looking at some of the html I'm using for things like popups, tab controls, and buttons. JQuery UI was brought to my attention a few weeks ago...

JQuery UI draggable not working at all!

Why does this not work at all for me? <script type="text/javascript" src="Javascript/jquery-ui-1.7.2.custom.min.js"></script> <script type="text/javascript" src="Javascript/jquery-1.3.2.min.js"></script> <script type="text/javascript"> $(function() { $('.selector').draggable({ axis: 'x' }); }); </script> <body...

jQuery: append individually or at once + selectors?

I'm building a jQuery UI widget and when I initialize I create a several divs, anchors, inputs. I've read that it's faster to build up an entire HTML string and then append it to the DOM than to append each individual DOM element. However, I need access to those elements later, so I'm also inclined to build them individually and then a...

send html link variable to jquery ajax php-file

i want to use jquery to retrieve a variable embedded in a html link, spo i can send it to the php file with jquery ajax. but i dont know how to do this. this is what i have written: <script ...> $("a").click(function(){ $.post("helpers/ajaxcall_country.php", {"HERE I WANT TO SEND THE VARIABLE"}, function(data){...

Regex to find word on page including inside tags.

Thanks to Chetan Sastry I have this Regex code to parse my page for a list of words and add the TM to them. var wordList = ["jQuery UI", "jQuery", "is"]; var regExp = new RegExp("\\b" + wordList.join("\\b|\\b") + "\\b", "g"); var $elem = $("#divWithText"); $elem.html($elem.html().replace(regExp, "$&&trade;")); This Regex is almost wha...

Remove row from one table and add it to another with jQuery

I am trying to remove a row from one table and add it to another with jQuery. I've examined this similar Stack Overflow post and feel like I am doing roughly the same thing but am obviously missing something as what I am doing is not working. I know I've got the right row as the remove is working but the row is not being added to the new...

Using jQuery to work with next first element that is not a sibling

What I need to do is get the next element which isn't of the same type as the current. I'm not sure if that makes any sense. As far as I know, next() in jQuery only gets the next sibling. This is what I have: <tr> <td> <a>Link</a> </td> </tr> <tr> <td> <div class="A"> <div class="B">...</div> <di...

How badly does jQuery performance degrade when using a lot of selectors, or does it?

I want to apply a click() event to all of the links on a page when the href of that link points to a file with a specific extension. The list of applicable extensions is hovering around 30 and may grow a bit in the future (but will never be more than 100). My first inclination is to structure the event binding like so: $("a[href$=avi],...