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 7677183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:21:54+00:00 2026-05-31T17:21:54+00:00

Basically on .show() I’ve been trying to have all of the inputs convert to

  • 0

Basically on .show() I’ve been trying to have all of the inputs convert to image tags with the img src equaling the original inputs value like this:

var currentPage = $('.three_paj_els:visible');
var nextPage = currentPage.next('.three_paj_els');
var the_parent_div_id = currentPage.attr('id');
    nextPage.show(function() {
        $('div#' + the_parent_div_id + ':input').each(function() {
            var the_image_SRC = $(this).val();
            $(this).replaceWith('<img src="' + the_image_SRC + '" ')
        })
    })

Been at it for a few hours now. I want only the ones in that specific div that gets shown to convert.

here’s a fiddle of what I’ve been working on http://jsfiddle.net/Utr6v/100/
when you click the next button, the <input type="hidden" /> tags should convert to <img> tags and the images should show.

Thanks a bunch in advance.
-Sal

  • 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-31T17:21:56+00:00Added an answer on May 31, 2026 at 5:21 pm

    currentPage doesn’t seem to have an ID. But you’re overcomplicating it – if you have the element, you can use that to execute jQuery functions on. You don’t need to do an element -> ID -> element conversion since that’s pointless.

    To find descendants you need to put a space between the element selector and the descendant selector, otherwise the selector applies to the elements themselves. In your case, you can just use .find.

    Also, you were missing the closing tag of the image.

    http://jsfiddle.net/Utr6v/101/

    // I guess you want to replace with images on the new page, not the one
    // which gets hidden
    
    nextPage.find(':input').each(function() {
        var the_image_SRC = $(this).val();
        $(this).replaceWith('<img src="' + the_image_SRC + '">')
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So basically I am trying to have div.show fade in on hover and then
Basically I've been trying to use jQuery to show() and hide() a sub navigation
I have this script that basically will show a product or products based on
So basically I have a controller. something like this def show @user = User.find[:params[id]]
I am using FullCalendar to show some events. Basically I have a valid json
When I run my code it doesn't show up. Basically I have a custom
I have an NSArray of 500 annotations and I basically want to show only
Basically I am trying to show hide divs and links, but having some trouble.
I want to use settimeout() function with .each function.Basically iwant to show each image
Basically i wanna show total list items for each list item that contains sub

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.