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

  • Home
  • SEARCH
  • 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 8446819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:01:16+00:00 2026-06-10T10:01:16+00:00

First my code: Html <div class="product_image m2" id="m2"><a href="#" id="10" class=’multi2′>test..</a></div> JS $(document).ready(function(){ $("#m2

  • 0

First my code:

Html

 <div class="product_image m2" id="m2"><a href="#" id="10" class='multi2'>test..</a></div>

JS

 $(document).ready(function(){

     $("#m2 a").bind("click", function() {
        var value = $( this ).attr( 'id' );
        alert(value);
        return false;
    });


    if ($(".multi2").length > 0){
    
           $(".multi2").yoxview({
           
                cacheImagesInBackground:true,
                skin: "top_menu",
                lang: "hu",
                
                images: [
        
                { media: { src: 'images/galeria/cella/image01'+value+'.JPG', title: 'Cella hegesztő' }},
                { media: { src: 'images/galeria/cella/image015.JPG', title: 'Cella hegesztő' }},
                { media: { src: 'images/galeria/cella/image013.JPG', title: 'Cella hegesztő' }},
            
            
            ]
            });
    }

 });

So, I use Yoxview. Multi2 class define the images and when user click on link (or thumbnail). lightbox shown and slideshow start.

The slideshow start every time from the first image defined in JS. I would like to change this so i would like to pass the id of href inside in m2 div to the image list.

Unfortunately I can’t do this. I try this code but with this the script crash. How can I pass VALUE to image list?

  • 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-06-10T10:01:18+00:00Added an answer on June 10, 2026 at 10:01 am

    Try code below, this probably will work, but not a good solution.

    EDIT
    By the way as Kanishka mentioned its not legal to start ID with a number. You can store photo id as an custom attribute <a href="#"... data-photoid="2" ... /> and get it using jquery data() $(this).data('photoid').

    $(document).ready(function(){
         $("#m2 a").bind("click", function() {
            var value = $( this ).attr( 'id' );
                if(!$(this).data('yoxed')) {
                     $(this).yoxview({
    
                        cacheImagesInBackground:true,
                        skin: "top_menu",
                        lang: "hu",
    
                        images: [
                           { media: { src: 'images/galeria/cella/image01'+value+'.JPG', title: 'Cella hegeszto' }},
                           { media: { src: 'images/galeria/cella/image015.JPG', title: 'Cella hegeszto' }},
                           { media: { src: 'images/galeria/cella/image013.JPG', title: 'Cella hegeszto' }}
                        ]
                      });
                     $(this).data('yoxed', true).trigger('click');
                }
            }
    
            return false;
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code : HTML <div class="temperatura"> <a href="/link/" class="temperatura_localita"> <div style="padding-left:12px;"> Text1
I have such html piece of code: <ul class=myClass> <li><a href=url1.html>first link</a></li> <li><a href=url2.html>second
I am showing my code first <div class = buttonsHolder> <asp:Button runat = server
html code <div id="signup"> <form id="suform" method="POST" action="roma/roma"> <p> <label>Frist Name</label> <input type="text" id="sufName"/>
I have the following HTML code: <div id=summary_form> <textarea class=summary>Please fill in</textarea><br/> <textarea class=summary>Please
Here's my HTML code: <tr> <td>data 1</td> </tr> <tr class=test> <td>test data 1</td> </tr>
Hello i have an HTML Code like this <div id=top> <div class=panel> <h1>toppanel</h1> <p>Content
First of all; example of HTML code: <div classgrap1> some conetent</div> <div classgrap2> some
I have the following code: HTML: <div class=sectionInner><div class=carousel></div></div> <div class=sectionInner></div> <div class=sectionInner></div> <div
I have a simple situation here. lets face html code first => <form name=geoKey

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.