Question

Asked on 2011-05-10 at 13:44:51ID: 27360756

Script only works if I leave alert in...  jQuery Oddness....

by: brianmfalls500

Rating9.1Excellent

The script below only works if I leave the alert in.  If I comment it out, the script does nothing.  It should work without the alert.  It should iterate through each element with the 'editable' class and update the innerHTML with the index from the array.  It should, but it doesn't.  I've fiddled with it for a while.  What is happening here???  T.I.A.!

[code]var textContent = 'Header Text|White Text Over Green BG|Primary Text Content|First Footer Text|Second Footer Text';
      alert('saved text content loaded into template');
var contentArray = textContent.split('|');

$('#ajaxContainer .editable').each(function(index) {
      this.innerHTML = contentArray[index];
});[/code]

Related Solutions

Solution

Sign up now to view this solution! It's quick, easy, and secure to subscribe. We will return you to this solution, unlocked, when you’re done.

About this Solution

View This Solution - Start Your 30 Day Free Trial
Zone
general
Tags
Participating Experts
1
Solution Grade
A

Replies

 by: imantas

Posted on 2011-05-10 at 13:53:56ID: 36812625

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: brianmfalls

Posted on 2011-05-10 at 14:10:21ID: 36812626

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: brianmfalls

Posted on 2011-05-10 at 14:12:33ID: 36812627

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: imantas

Posted on 2011-05-10 at 14:12:37ID: 36812628

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: imantas

Posted on 2011-05-10 at 14:15:25ID: 36812629

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: brianmfalls

Posted on 2011-05-10 at 14:19:11ID: 36812630

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: imantas

Posted on 2011-05-10 at 14:22:02ID: 36812631

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 by: brianmfalls

Posted on 2011-05-10 at 14:22:48ID: 36812632

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

Log In

Forgot your password?Sign up

Top Experts

  1. mplungjan

    1,840

    0 points yesterday

    Profile

BrowseAre you an Expert?