jquery

unterminated string literal

i'm using jquery to output the results of a json string created by php from a database, the only problem is, that some of the data is on multiple lines... how would i get around this causing a unterminated string literal error in javascript? ...

prevent Scroll "bubbling" from element to window

I have a modal box window (pop-up) that contains an iframe, and inside that iframe there's a div that is scrollable. When I scroll the iframe's inner DIV, and it has reached its top or bottom limit, the window of the browser itself starts to scroll. this is an unwanted behavior. I've tried something like this, which kills the main win...

tablesorter with jquery does not sort numbers correct

Trying for days now (2 that is) to get tablesorter with Jquery to get the numbers correctly sorted. I am using the last versions of both scripts. The table is rendered fine, but sorting of the numbers goes wrong. If sorted it gives the following result: 8 7 4 32 31 3 and so on.. where you would expect that: 32 31 8 etc would be displa...

Javascript language and the $ in jquery

I was wondering, how does the $. in $.ajax({...}); work? it doesnt make sense to me. Sure .ajax as a member make sense but $ isnt a variable name? or is it? How is it defined? ...

ASP.NET: Manually updating an UpdatePanel using jQuery

I'm having trouble with updating an ASP:UpdatePanel using javascript (jQuery). Here're what I have. I'm using the hidden button trick as I seem not the be able to get the ClientID of the update panel for a __doPostBack trick). <asp:UpdatePanel runat="server" ID="pnlUpdate"> <Triggers> <asp:AsyncPostBackTrigger ControlID="btnUpdate" /...

Set URL via selected jQuery tab

Further to this question - and using the same getUrlParam.js plugin. $(document).ready(function(){ var param = $(document).getUrlParam('tab'); $("#tabs").tabs(); $("#tabs").tabs('select', param); }); With this code I am able to control which tab loads on a given page e.g. blogs/?tab=tv loads the tab #tv on the /blogs/ page. However ...

jquery fading sequence

Hi there, I am attempting to fade in a set of divs, one after another. I thought I could use the simple For Each function that jquery offers. My code is as follows: $('#menu_activate').click(function(){ $('div.section').each(function(i){ $(this).fadeToggle(); }); }); The good thing about this is that it does iterate thr...

Unobtrusive JavaScript with server side values, best practice?

I'm used to do doing things like this: <a href="Javascript:void(0);" onclick="GetCommentForGeneralObservation(<%# Eval("ID") %>)"> That would be in a repeater or such like btw. However I an now trying to use unobtrusive JavaScript and hence get rid of any JS in the markup. I was trying to figure out what the best practice is in case...

jquery Storing the value of an input box, then recalling it elsewhere

$("form").submit(function () { var english = $("input #rawr").val() $("h1 em").append(" " + english + " "); //Current submit brings up 'undefined' return false; }); <form> <input type="text" name="rawr" id="rawr" /> <input type="submit" /> </form> ...

Stretch image vertically either using javascript or Jquery

Hey I'm new here and I would appreciate anyhelp as I have been banging my head against the wall for weeks now. I am currently working on a Wordpress theme located at blog.honora.com. If you take a look you can see that there is an image that stops and then forms a white background. The image is located at http://blog.honora.com/wp-conte...

Need help fixing this jQuery dropdown script

Hi All I'm working on a script for a dropdown menu. It's working fine so far, but I need to add one more thing and I can't figure it out. Here's the current script: $j('ul.menu > li').hover( function() { var ulHeight = $j('ul', this).height(); $j(this).children('ul').css({height: 0}).stop().animate({height: ulHeight}, 400); }, ...

Selecting Multiple Files for Upload in Web Page

I am building a file upload web page that has the capability to process multiple upload files. Ideally I would like to allow the user to select a folder and have the web page enumerate the files in the folder client-side, but I don't think that's possible without a browser plugin. Alternatively, would it be possible to allow the user t...

JQuery Ajax issue

I have this problem, I load a page using JQuery ajax, now within that page I also have a ajax submit form, somehow my ajax does not want to work on the second page, if I call that page directly the ajax works. Is it possible to include ajax within ajax as description above? ...

jQuery menu broken when moving between list items

I've created a custom jQuery horizontal menu with drop downs. Initially it just faded a sub-menu in when hovering on a list item, and faded it out when moving away. However I want to create an effect where if you move the mouse out of the sub-menu, it doesn't disappear instantly (e.g. if you overshoot it by a pixel). I was made aware o...

Iframe Link Question

I have an iframe on a page and there's a link inside the iframe. When user clicks on the link I want it to open in the current page (but not in the iframe), I want the current page to reload with the target of the link in the iframe. How can I do that? I hope there is some javascript or jquery solution because I need to achieve this in ...

abbreviate database output with jquery

I am looking for a way to limit the amount of characters displayed in a heading using jquery. Essentially the heading is retreived from the database but I only want the results to display on one line of a set width so would like to limit the output or abbreviate it to stop the images below being pushed too far down. The following Live e...

Need to sort divs to access links within

Hi, Need a little help with this... the idea is that it scrolls through divs.... But when I get to the next div I can’t access that specific link but only the first divs link... think i need to swap the divs but not 100% on the best method. this would be the HTML structure... <div class="insightcontainer"> <div class="insightA...

Using JQuery, how do you select one element based on another's name?

If I have a bunch of numbered fields in a web form, like an invoice: < input type="text" name="Item1" /><input type="text" name="Desc1" /><br /> < input type="text" name="Item2" /><input type="text" name="Desc2" /><br /> < input type="text" name="Item3" /><input type="text" name="Desc3" /><br /> Using JQuery, how would I select the fi...

Most customizable Lightbox plug-in for jQuery?

I am searching for a simplistic jQuery Lightbox plugin with minimal features. Must support Ajax / Inline / Images Must have a close button. Must be easily customizable (CSS wise). I tried a bunch of plugins and they have so much unnecessary styling. Must have a close button in the top right corner. Must be a jQuery plug-in. I could w...

page does not run jquery script on load

I have an ASP.net mvc page that executes a jquery script on load. The script calls an action on a controller and hydrates a dropdown list. this works on my dev machine but when deployed to the webserver (Win 2k3 box running IIS 6) the page loads but it does not run the script resulting in an empty drop down list. I have the jquery-1.3....