Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6381619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:25:00+00:00 2026-05-25T02:25:00+00:00

UPDATE: Here is the entire function I’m using when a person click to advance

  • 0

UPDATE:
Here is the entire function I’m using when a person click to advance a slideshow:

$('#navNext').click(function(){
  var current = $('#slider1').find('li.on');

  if(move !==-2695) {
      move = move - amount;
      templateNum = templateNum +1;
      current.removeClass('on');
      current.next().addClass('on');
      var grabAlt = $('.on img').attr('alt').split('|');
      var holdAlt = grabAlt;

   var grabAlt = $('.on img').attr('alt').split('|');
   $('.altDescription').html('<ul><li>' + grabAlt.join('</li><li>') + '</li></ul>');

      letsMove(move);
      $('.templateName').text('Template' + ' '+templateNum);
  }

});

NOTE: my ‘letsMove(move);’ function is declared somewhere else as are other small things. I’m using a fixed-width for images to slide through and currently would have to change the maximum/minimum value..but that’s all fine for now. I’m just focusing on the li’s now.

I have this:

var grabAlt = $('.on img').attr('alt').split('|');
var holdAlt = grabAlt;

$('.altDescription').html('<li>' + holdAlt[0] + '</li>' + '<li>' + holdAlt[1] + '</li>' +     '<li>' + holdAlt[2] + '</li>'+'<li>' + holdAlt[3] + '</li>' +'</ul>');

from the code you might see that I’m grabbing the alt text from an image, separating at the piping symbol which throws them into an array, and then make each item a list item. This all works just fine.

What I’m trying to do now is make it more dynamic by saying “for every item in the current array, wrap it in an <li>,</li> tag.

I’m playing with .each() but I’m getting a little mixed up. I thought it might be something like:

$(holdAlt).each(function(){
$('.altDescription').html('<li>' +holdAlt+'</li>');})

but I realized I’m not passing a specific item from the array…but the whole array and then…well….fail.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T02:25:01+00:00Added an answer on May 25, 2026 at 2:25 am

    While not the traditional way, this is how I would do it:

    var grabAlt = $('.on img').attr('alt').split('|');
    
    $('.altDescription').html('<ul><li>' + grabAlt.join('</li><li>') + '</li></ul>');
    

    Note: This does not take into account the possibility that grabAlt might be empty.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is the JS: $('#createReview').click(function () { CKEDITOR.instances['ReviewText'].updateElement(); $.ajax({ type: 'POST', cache: false, url:
Here is the JS: $('#createReview').click(function () { CKEDITOR.instances['ReviewText'].updateElement(); $.ajax({ type: 'POST', cache: false, url:
Update I summarized the question and its answers here My objective is to detect
Replaces Question: Update multiple rows into SQL table Here's a Code Snippet to update
UPDATE - A comprehensive comparison, updated as of February 2015, can be found here:
Update: Thanks for the suggestions guys. After further research, I’ve reformulated the question here:
How do I update a Gridview on a aspx page from a webmethod? Here
we're dealing with a very slow update statement in an Oracle project. Here's a
How can I represent the following in XSD. <price-update> <![CDATA[ arbitrary data goes here
Here is the updated question: the current query is doing something like: $sql1 =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.