JQuery :: Losing Table Zebra Stripes After Ajax Load()

Aug 25, 2010

table stripes are init with ... $("tbody tr:nth-child(even)",$context).addClass("even");

The event function for a click on a <th> loads sorted data ... $('tbody',$context).load("Grid.ajax.php?grid_id="+$grid_id+"&orderby="+this.title);

The striping is lost ... I tried adding the same statement after the load() with no change.

#1 ... What is the best practice for restoring the stripe effect other than doing it on the server.

#2 ... Should I call ".empty()" before an ajax request to protect against garbage left in memory?

#3 ... I also have a row highlighting functions for mouseover/mouseout events. Can I assume the ".live()" event definition should apply to rows added after an ajax request.

View 1 Replies


ADVERTISEMENT

Jquery :: Load Losing The CRLF?

Aug 25, 2010

I am using JQuery to load data into a textarea element on a form. The data has CRLFs in it, and of course the textarea element supports that. However, they seem to get lost in the load.

Code:

var sURL = "AjaxFunctions.php?Act=QuoteComment&CommentID=" + sID;
$('#MainEdit').load(sURL);

I've tried replacing the CRLF with <BR> on the backend before returning the data, but that doesn't work. Is this just a limitation of the technology?

View 1 Replies View Related

JQuery :: Update Table Without AJAX Load: Scrolling

Oct 4, 2009

I've created some jQuery which remove many tr rows from my table and inserts new via AJAX. This indicate that the page is scrolling because first the table increase after elements is removed and afterwards it grows when the new content is inserted. Is there a way to let jQuery update this table without doing so? Eg. by first refreshing the DOM after I finish my manipulation. Here is a bit of my code:

$j(".bookingViewRow").each(function() {
$j(this).remove();
});
$j.get('cajax.php', {}, function(html) {
$j("#bookingView").append(html);
});

View 2 Replies View Related

IE Losing Onload Event After Ajax Request

Jun 21, 2006

I'm having a problem on a site where an onload event works in Firefox but not in IE. Actually, the onload event works in IE once - but then if the Ajax onreadystatechange changes, IE chokes and doesn't use the onsubmit event that worked when the page first loaded. Code:

Try entering something that isn't an email address and submitting it. Then try just submitting a blank form. Firefox will do the asynchronous call to a PHP script and return the results - IE will do it the first time, and then not again. Code:

IE works fine if I add a simple 'onsubmit="saveData();"' to the form itself, but I'm trying to keep my semantic, presentation, and behavioural layers separate. Using the DOM seems to be the way to do that, but IE seems to only do an XMLHttpRequest once and then stop listening for the event.

View 3 Replies View Related

JQuery :: TableSorter Plugin - Retaining Zebra Shading

May 19, 2011

I am using the jQuery TableSorter plugin on a table that I have shaded. The table sorts successfully, but the shading is not refreshed when the table refreshes. How can I refresh the shading as well after the sort?

View 1 Replies View Related

JQuery :: Tablesorter And Zebra Does Not Stripe Rows On Initial Sort

May 27, 2009

With a tablesorter config that looks something like this:
$("#table").tablesorter({
cssHeader: "sortAble",
cssAsc: "sortAsc",
cssDesc: "sortDesc",
headers: {3: {sorter: 'time'}},
sortList: sortOrder,
widgets: ['zebra'],
widgetZebra: { css: ['','alt'] },
debug: true
});

The alternating row style is not applied to the odd/even rows on the initial display of the table. If a user clicks any of the headers to change the sort-by column, or to change the sort-order, then the striping is applied. I'm using jQuery 1.3.2 and tablesorter 2.0.3. Searching the list for "tablesorter zebra", I found mention of needing to patch tablesorter 2.0.3 for 1.3.2 [URL] - does this still apply?

View 1 Replies View Related

Zebra Items Not Responding To Changes

Aug 3, 2011

I am building a shopping cart in Volusion. I've come really far and can find my way around HTML and CSS.But the template I am using has a zebra function that it uses on the shopping cart screen. The colors it is using are terrible, and I can't figure out how to change them.By zebra, I mean it picks every other row in a table and assigns a different background color. I am noticing in firebug that the div-ids of the items in the cart have div-ids taht are not listed in any of the CSS files in the theme.I figured out that this type of coding is usually done in JavaScripting. I tried editing that file in every logical way, and I can get no response out of it aside from my browser hanging. I even tried commenting out different sections.

I'm not sure if you are at all familiar with Volusion, but they provide absolutely no assistance and try very hard to make things as hard as possible so customers will be desperate for their design services. All support will say is, "we are prohibited from providing any coding information. Would you like me to transfer you to sales?" They routinely remove resources that were once helpful. Nice customer service.

View 3 Replies View Related

JQuery :: Ajax.load() Seems Unable To Load HTML5 Tags Under IE?

Mar 3, 2011

I have a problem when trying to load an HTML5 element with Ajax (jQuery.load ()).Here is a simplified example of the problem.

Main page :
<!DOCTYPE HTML>
<html>
<head>
<title>Title</title>
<!--[if lt IE 9]>

[Code]...

View 5 Replies View Related

JQuery :: Drag Table Columns Of A Ajax.loaded Table

Oct 14, 2011

I want to drag table columns of a ajax.loaded table.... is this possible with a jQuery-Script?

View 1 Replies View Related

JQuery :: Load Pages Into A Div Using The Load Function With AJAX

Feb 15, 2011

I have the following code to load some pages into a div using the load function. When I click one of the links though, nothing happens. I have read a couple of books on JQuery and looking at the examples they give, this looks correct so I am at a loss.

[Code]...

View 4 Replies View Related

JQuery :: Ui Accordion Losing Links In IE6?

Apr 9, 2010

I've just set up an accordion using the simple version that comes with JQuery UI.It uses links inside h3s as the headers, and I noticed that links within the content divs had disappeared. The documentation at says - If you have links inside the accordion content and use a-elements as headers, add a class to them and use that as the header, eg. header: 'a.header'.I'm just struggling with the right way to do that. I've tried giving each 'a' a class of 'faq' and using :

Code:
$(document).ready(function() {
$("#faq_accordion").accordion( { header: 'a.faq' },{ autoHeight: false } );

[code]....

View 4 Replies View Related

JQuery :: EvalJSON Losing Special Characters?

Mar 19, 2010

I have a JSON source (a plain text file) that has some special chars in it and they look correct in the text file. However when I retrieve the file and use $.evalJSON against it the resultant array has things likeinstead.I'm sure I must be missing something obvious

View 1 Replies View Related

JQuery :: Losing The Form Values In Firefox 2/3 Only?

May 28, 2009

Unexpectedly it's not happening in IE 6/7 :) So looking for form jQuery plugin which can save and deserialize form values on a event. Already using form plugin which saves form values in an Array but it doesn't write back the values, need to write back those values after some manipulation to the individual form. But the case is bit different here; we have been using multiple forms on a single page.

View 3 Replies View Related

JQuery :: Preventing An Input From Losing Focus?

May 11, 2010

Basically I want to prevent a user from moving to another field if the current one is invalid (non-numeric).I've tried a few things that I though would do the job, I've also tried using the change event with the last line (resetting the focus to the current element) but no dice.

jQuery('.setupprice, .monthlyprice, .quantity','#config_dialog').live('focusout',function(e)
{
var val = parseFloat(jQuery(this).val());

[code].....

View 7 Replies View Related

JQuery :: Uniform Dimension For Images Without Losing Ratio

Jan 6, 2012

i am working on a project that will involve displaying a long list of product information. this will include images and description of the product. knowing fully well that users must have uploaded images with different dimensions, i want to display the images such that they will all have same dimensions without having some of them lose aspect ratio. i want it to look like the way facebook displays facepile (your friends), it may only hide a portion of it,

View 1 Replies View Related

JQuery :: Losing Object Definition On Return To A Click Handler?

Feb 8, 2011

I am looping through an array of objects and creating an <li> element for each one and appending to a <ul> in the DOM. Works fine.During the looping I am also attached a 'details' object as data for the list element:$(thisListItem).data('details',{<obj>});Later, I am using the selector:$('ul#images_list li')to attach an on click function for each <li> element.In the click handler I am reading the data 'details' object for the <li> element:dataDetails = $.data(lotImage,'details');and, using the jAlerts plugin, I am opening a jPrompt which asks for the user to enter a price.

The jPrompt call includes a callback which receives the entered value as a parameter. The callback uses the value to 'post' the updated value, via $.ajax, to a server side unction.After OK is clicked in the jPrompt popup, in Firebug, I get an error that the dataDetails is undefined and it lists the line number in the click handler where I originally read the data object from the <li> element.I don't really understand why it should care after the click event has fired and the jPrompt callback has been invoked

View 3 Replies View Related

JQuery :: Cycle.js - Multiple Slideshows - And Timing - On Losing Window Focus

Nov 14, 2011

I've used the fantastic Cycle plugin on a couple of projects now, and it's worked really well.

I have four elements that use cycle, and I've used the timeout and delay options to have one box after another flip repeatedly.

This works well, so the first slide flips after 1 second, the second after 2 and so on, and then each slide continues to flip in turn.

Unfortunately, when I move to another browser tab or another window, then move back, returning focus to the window with the flip elements, the timing seems to go wrong. Each slide continues flipping, but they're no longer flipping one at a time.

My code runs as follows:

I'd like to see each one continue flipping in turn when I go back to the first tab.

View 2 Replies View Related

JQuery :: Superfish Rollover Flyout Menu - Losing Font Color?

May 14, 2010

I have just started using Superfish. I am using a reverse color scheme (the background is green font color white) - so when I rollover a main menu item the menu item rolled over has a background of white, font color is green. When I go to a sub menu item the background of the main menu item stays white, but the font also stays white (I want the font to stay green).This is an example of how I want my menu to work:

http:[url]....

(Notice that when you rollover and then fly out, the main menu item rolled over maintains its background and foreground color).This is the part of the superfish.css that I have edited:

/*** DEMO SKIN ***/
.sf-menu
{[code].....

View 1 Replies View Related

JQuery :: Dynamically Load Html Into A Table?

Jul 27, 2009

I am trying to dynamically load html into a table, i.e add new rows in the table if a user clicks on an element in the table. Calling code :

<TD><a href="#" onClick="javascript:AddElement('someVal',
'someOtherval');return false;">Click ME</a></TD>
No problems there, I have a function :
function AddElement(someval, i) {

[Code].....

View 1 Replies View Related

JQuery :: Reloading The Td In Table Using Load()----This Is Taking 8 Sec To Execute?

Oct 18, 2011

How to load jquery very quickly on server?

View 1 Replies View Related

JQuery :: Ajax Load And Inline?

Jun 25, 2010

I'm loading some page content with the ajax load event. The loaded content contains some <script> function calls. These appear to get evaluated, but the script ( a google map ) doesn't perform as expected.

Is the inline function run with the code on its page, or with the scripts on the page I'm loading it into?

View 1 Replies View Related

JQuery :: Load Content To Div Using Ajax

Mar 25, 2010

I load content to div using ajax. In that new loaded content are anchors which make another ajax requests, but they don't work. I suppose that it's caused by $(document).ready();

For example:

Anchor with class '.dokosika' in loaded content doesn't work as I want to...

View 2 Replies View Related

JQuery :: Cannot Load Image Via Ajax

Sep 17, 2011

In the gallery of my site, I have problems with the gallery, because I cannot upload images via Ajax. The site is [URL].

View 2 Replies View Related

JQuery :: Execute After Ajax Load?

Apr 24, 2009

how to execute the javascript code after call it by ajax sure with jQuery ?

for exmple

<script type="text/javascript" src="dfile/js/jquery.js"></script>
<script type="text/javascript">
function pri(forshow,forhid_1,forhid_2,forhid_3){
$(forshow).show();

[Code].....

View 1 Replies View Related

JQuery :: Get The Contents Of An Ajax Load?

Nov 3, 2010

how would I get the contents of an ajax load to be added after a certain <tr></tr>?

View 1 Replies View Related

JQuery :: Load Another Div After Ajax Completion?

Aug 6, 2011

I have the following HTML code:

<div id='ad_fulldiv'>
//Some text and images
<div id='ad_content''>
require_once('/include/adcontent.inc.php');
</div>
</div>

I have also a Jquery code with Ajax request. In the file adcontent.inc.php there is a switch loop which echoes random content what depends on the content in a database. After the user clicks on a button a Ajax request is called which updates the database. After success the div ad_content should fadeout en should be reloaded with adcontent.inc.php. It should have other content now, because the Database is updates.

But how can I reload the div? I think the load option doesnt work.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved