jquery

How to scroll to an element after expanding with slideToggle?

scrollTo is not scrolling to a div that expands past the bottom of the page... any suggestions? (jQuery 1.3, scrollTo 1.42) function toggleCollapsible(ownerDiv) { ownerDiv.next(".Collapsible").slideToggle("fast", $.scrollTo(ownerDiv, "slow")); } ...

Modal Window Link Re-directing not working in IE6

I have used both prototype windows and jquery thickbox windows for creating modal window effects and these are not working only in IE 6. I am passing a parameter at the end of the url, but that parameter passing it not working. If i remove the parameter and give a normal url, its working fine. Is there any other way to pass a parameter t...

jQuery Calulation Plugin - Simple Advice Needed.

Hey everyone, Simple question, but I can't figure it out. What is the launcher syntax I need to perform the following function: <input type="text" id="value1" /> <input type="text" id="value2" /> <input type="text" id="value3" /> <input type="text" id="total" /> I want to perform [(value1 * value2) + value3] and have the result roun...

Trouble Parsing Atom feed with jQuery

I have an Atom feed like this... <?xml version="1.0"?> <feed xml:base="http://earthquake.usgs.gov/" xmlns="http://www.w3.org/2005/Atom" xmlns:georss="http://www.georss.org/georss"&gt; <updated>2009-10-12T14:47:25Z</updated> <title>USGS M2.5+ Earthquakes</stitle> <subtitle>Real-time, worldwide earthquake list for the...

jQuery replace strings in many classes

I'm trying to use jQuery to replace all occurrences of a particular string that occurs in a certain class. There are multiple classes of this type on the page. So far I have the following code: var el = $('div.myclass'); if(el != null && el.html() != null ) { el.html(el.html().replace(/this/ig, "that")); } This doesn't work if t...

How to load html using jquery into a TinyMCE textarea

Hi, I've a textarea that uses TinyMCE as a WYSIWYG. Once that this textarea is loaded I want that, clicking a button "Edit" some html code that I bring with AJAX jquery is loaded in that textarea. I want to insert this html code <p>hello</p> Original textarea source <textarea name="corpo" id="input_corpo">Text Here</textarea> JQUER...

jquery: select and unselect items of listbox

I have 2 listboxes (select, in HTML) in a ASP.NET page. I want that when one item of list1 is selected, the selected item in list2 is unselected, and viceversa. The 2 selects are mutually exclusive. How can I do? ...

jQuery cache XML

Hi, I'm trying to create a portfolio site where my pieces reside in an XML file. I'd like to store the XML DOM in a JavaScript variable so that I can access it without making a call to the server every time a user clicks to load a new piece. Right now I have: $(document).ready( function() { xml = getXML(); }); function getXML() { ...

jquery paging problem

i am using JQUERY plug in for paging http://jonpauldavies.github.com/JQuery/Pager/PagerDemo.html its working fine on page. but when i call page via JQUERY load method, paging not showing $('#divbody').load('abc.php?q='+pid, null, function(){ }); and code on abc.php is <script type="text/javascript" language="javascript"> $(docu...

Disable original javascript keypress event and replace dynamically

Currently I have a textarea with an onkeypress event specified in the HTML tag. I am trying to capture this keypress and save it as a function that will be used to override it, as I want to add another condition to when it is run. Here is the code I am trying to implement. $(document).ready(function(e) { var defaultKeypress = $('t...

JQuery with dynamic content

If I had a div tag inside a repeater, and i want to add a jquery effect to every one of those div tags, how would that be done? <script type="text/javascript"> $(function() { //run the currently selected effect function runEffect() { //most effect types need no options passed by default var...

Get css value without DOM element

Hi all, I am wondering if there is a way to get css value from stylesheet file when there is no element in the DOM using it? I am using jQuery and I use selector $(".classname").css() to get the values. But with the case "classname" is not in any element, what to do to get the value" Thanks ...

calculating text width with jQuery

Hi. I'm trying to calculate text width using jQuery. I'm not sure what, but I am definitely doing something wrong. So, here is the code: var c = $('.calltoaction'); var cTxt = c.text(); var cWidth = cTxt.outerWidth(); c.css('width' , cWidth); Thank you for your help in advance! ...

How can I fade out, change test and then fade in with jQuery cleanly?

Hi all, I've been playing with a div I have that changes on a user action. I want to have it fade out, change the node value and then fadeIn. No matter what I try I always see the value change as the element is fading out. Can anyone help? calculator_result.fadeOut(); calculator_result.css("color", "#fff").html("&euro;...

Why doesn't jQuery Tablesorter Plugin work on this Wordpress page?

I have a working example of the Wordpress/jQuery plugin on this test page: http://beerlyrics.com/jimmy-jones/ I hardcoded it into the header on this page and both the pagination and filter mechanisms work correctly. I have converted this over to a new page and am now using wp_enqueue to call all my scripts as it is supposed to be done:...

ajax jquery - why this extra slash?

I often see code where the ajax files being contacted (somefile.php in the example below) are preceded with a / Is this / just to preserve the structure www.example.com/somefile.php or is it for security reasons like escaping? If it's the latter, an explanation would also help.. $.post('/somefile.php', { id: id, val: val }, function(...

jQuery Key Events with a Search Box

Hello all, I'm working on an autosuggest plugin with jQuery, and I'd like to add Keypress events so that users can arrow down and up. Also, if they press enter it will add the value to the input. This is what my HTML looks like: <input id="myInput" class="textInput" type="text" name="instructorName"/> <label for="search"> </...

Check if jquery metadata exists?

Couldn't seem to find any info about this googling. Hope that doesn't mean because you can't do it. I'm trying to check if metadata exists on an element. So if I have an element like <a href="#" class="myclass {myid:2,text:bla}">, with my click function I would use $(this).hasClass('myid') or $(this).hasClass({'myid'}). Is it possible to...

Adding a row to a table dynamically

$(document).ready(function(){ var refreshId = setInterval(function() { periodicRefresh(); }, 9000); }) . function periodicRefresh() { $.ajax({ type: 'GET', url: 'include/ajaxActions.php', data: "action=displayLastEvent", success: function(msg){ var newid = $(msg).attr("id"); ...

JQuery File upload dialog not returning back to dialog from MVC Controller action

I have an ASP.NET MVC app which uses a jquery ui dialog for file upload. Everything is working fine with loading the dialog with the correct content and displaying the dialog on my click event however my issue is that after I process the action in my controller action method I don't return back to my dialog as I would expect an ajax like...