jquery

Why is the POST callback function not working

I am trying to perform the following fadeIn/fadeOut action within the jQuery $.post function. $.post('Scenario/SaveScenario', function (data) { $('<div class="save-alert">The current scenario has been saved.</div>') .insertAfter($('.buttons')) .fadeIn('slow') .animate({ opacity: 1.0 }, 2000) .fadeOut('slow', function...

Filter <p> within a div and wrap all using jQuery

I'm trying to wrap all from a div in a sub-div; the numbers of is not constant. <div id="page"> <p>text</p> <p>text</p> <p>text</p> </div> trying to obtain : <div id="page"> <div> <p>text</p> <p>text</p> <p>text</p> </div> </div> using : jQuery('#page').filter('p').wrapAll(''); and it's not working. Anyo...

How to auto-scroll when the page gets too long?

I have a simple website, but I have a jquery function when a button is clicked, a list slides down. But I would have to scroll to see the list. How can I have it auto-scroll down when the page gets to long? ...

jQuery hover problem due to z-index

I want to trigger a hover event for an element using jQuery, but I have an semi-transparent png positioned over the element using z-index. Is there any way to tell jQuery to ignore the png and trigger the hover event for the element underneath it? ...

SimpleModal and ASP.NET MasterPage

Integrating SimpleModal with ASP.NET and MasterPages This is a continuation of a previous thread found here. Thanks to the help I received previously the code worked in a single page and I was able to use SimpleModal. But my application has MasterPages, so I pasted it into another test form. The results are different then the test I r...

Using jQuery selectors to find all ids that end a certain way

I am adding a row using the clone() function and then am having to rename all of the divs in the newly cloned row. I was trying to do that this way: // Add button for new TOEFL entry $("#add-TOEFL").button().click(function( event ){ event.preventDefault(); var tag = 'TOEFL', ...

Why isn't this simple bit of jQuery getJSON working in IE8?

I've got a very standard AJAX request: $.getJSON('/products/findmatching/38647.json', {}, function(JsonData){ var tableHtml = ''; var x; for (x in JsonData.matchingProds) { var matchingProd = JsonData.matchingProds[x]; var buyMessage; if ( x == 0 ) { buyMessage = 'Buy Cheapest'; } else { buyMessag...

Cannot get hyperlink to respond to click()

Hi - I'm learning jQuery and can't figure this out: Here's the HTML <a id="myid" name="myid" href="stub">click here</a> and the jquery snippet: $("#myid").click(function() { alert('Hello from click'); }); Yet when I click on the link no alert displays. Something basic no doubt, What could I be doing wrong? Thanks ...

How does one add arrays of elements to the DOM in jQuery?

Coming to jQuery from a functional background, I am fond (perhaps unreasonably so) of elegant chains of functions. I often find myself dealing with arrays of elements, such as those that may result from $.map, and my ability to manipulate these arrays in the DOM seems quite limited. Here's some sample code that runs through the results o...

how to remove the borders in JQuery Layout?

Hello I am using jquery layout plugin from http://layout.jquery-dev.net/ . my options are following: <script> $(document).ready(function(){ // create page layout pageLayout = $('body').layout( {applyDemoStyles: true, spacing_open:0, spacing_closed: 0, slidable: false, togglerLength_closed: 0 }); pageLayou...

Multiple jquery Scripts on one page

I am brand new to Jquery and have run into something that if answered will help greatly in the future. I have 2 very simple questions I am using codeigniter, HTML5 and all php pages as well. I have a menu 'aside' with 4-5 sections that I want to be able to close to save space. So I am using 2 simple slideToggle scripts. $("a").click(fu...

Unable to set List Item Class in PHP for WordPress Site

Hi, Would really appreciate your help on people's recommendations on the best way to set a list item's currentmenu class, inorder to show the user the current active menu selected using php. I have moved my html/css site over to WordPress but originally had all my code inside my index.html file that consisted of a sidemenu div and jQue...

Creating Jquery submenu tabs from onclick on vertical menu

I have a left vertical menu and onclick I have to show the submenu in Jquery tabs on main content area on right side . How can I achieve it? ...

Access iPhone GPS coordinates

Basically what I am trying to do is get access to the gps coordinates on the iphone 4. I'm not creating any type of web app. I can't find too much other than the geolocation api, but that seems to be geared toward creating web apps. Is there a javascript function that I can call from the phone itself that will return its own gps coordin...

ListItems are not accessible by Jquery ajax call

hi I need to retrieve values of sharepoint list with jquery I invoke jquery:ajax call for following type of site http://localhost:port/site/devsite/_vti_bin/list.asmx in Processaresult function I dont get any rows but list is having two rows I checked the webservice by adding web reference then i got the error. Document type is n...

jQuery set iFrame onLoad attribute

I need to trigger a function when the iframe loads a second time (the user clicks some link in the iframe). When the iframe page changes I can set the window location to the iframe src. What I thought would be best is to set an onLoad attribute on the iframe element after the first load. I guess I would need the live event to tell when ...

jQuery: selector question (selecting by onclick attribute)

hi, i'm having this markup: <a href='#' onclick='loadpage(121);'> <a href='#' onclick='loadpage(122);'> <a href='#' onclick='loadpage(123);'> my question: how can i select the 2nd link object by jQuery using the id 122? i've tried something like $("a[onclick=loadpage(122)]") but didn't work. thx ...

Is it possible to prevent the "flipping" in an iPhone website via JavaScript/jQuery?

I just don't want the site change orientation when iPhone change orientation. Is it possible? ...

jQuery Code Assist for Eclipse

I am using Eclipse PDT Helios v3.6 I have tried using the jQueryWTP plugin @ http://www.langtags.com/jquerywtp/ I did what the Installation notes said. But in vain. I still am unable to get the Code Assistance. Has anyone had better luck with this? Help is greatly appreciated. ...

What jQuery ajax file upload plugin should I use?

The plugin should allow delete the uploaded file and multiple file upload. EDIT: Actually I am in a situation that I need to browse and delete some pictures in some uploaded folder. Thanks. ...