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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:54:31+00:00 2026-06-17T23:54:31+00:00

$(#mainMenu).children(‘li’).eq(0).children(‘a’).bind({ click : function() { Here I’m clearing blocks aside and section. And dynamically

  • 0
$("#mainMenu").children('li').eq(0).children('a').bind({
    click : function() {

Here I’m clearing blocks aside and section. And dynamically creating them by appending worksParser();.

        $('aside > *').remove();
        $('section > *').remove();
        worksParser();

And here I want to call function fromAsideToSection. And send dom element $('aside').children('.workExample') just appended to block aside.

        var x = $('aside').children('.workExample');
        alert(x);
        fromAsideToSection.call(x);

But x return (object object), instead of (object HtmlDivElement). How I can send (object HtmlDivElement) to function?

    }
});

function worksParser() {
    $.ajax({
        type : "GET",
        url : "base.xml",
        dataType : "xml",
        success : function(xml) {
            $(xml).find('siteExample').each(function() {
                var name_dump = $(this).attr('name');
                var mediaType_dump = $(this).attr('mediaType');
                var media_dump = $(this).attr('media');
                var video_dump = $(this).text();
                var description_dump = $(this).attr('description');
                var url_dump = $(this).attr('url');

                if (mediaType_dump != 'video') {
                    $('aside').append('<div class="workExample"><div class="mediaName">' + name_dump + '</div><div class="exampleMedia"><img src="' + media_dump + '" alt="" /></div><div class="descrExample" style="display: none">' + description_dump + '</div><div class="urlExample" style="display: none">' + url_dump + '</div></div><div class="separator"></div>');
                } else {
                    $('aside').append('<div class="workExample"><div class="mediaName">' + name_dump + '</div><div class="exampleMedia"><img src="' + media_dump + '" alt="" /></div><div class="descrExample" style="display: none">' + description_dump + '</div><div class="videoExample" style="display: none">' + video_dump + '</div></div><div class="separator"></div>');
                }
            });
        }
    });
}


function fromAsideToSection() {
    alert(this);
    if ($(this).children('.videoExample').length > 0) {
        $('section > *').remove();
        $('section').append('<div id="mediaName" class="mediaName">' + $(this).children(".mediaName").text() + '</div><div id="mediaBlock"></div><div id="mediaMore">Описание</div><div id="mediaDescription">' + $(this).children('.descrExample').text() + '</div>');
        $('section').children('#mediaBlock').append($(this).children(".videoExample").children().clone("withDataAndEvents, deepWithDataAndEvents"));

    } else {
        $('section > *').remove();
        $('section').append('<div id="mediaName" class="mediaName">' + $(this).children(".mediaName").text() + '</div><div id="mediaBlock"><a target="_blank" style="" href="' + $(this).children('.exampleMedia').children('img').attr('src') + '"> <img src=' + $(this).children('.exampleMedia').children('img').attr('src') + ' alt="1.jpg"></a></div><div id="mediaMore">Описание</div><div id="mediaDescription">' + $(this).children('.descrExample').text() + '</div>');
    }
    sectHeight = null;
    oldHeight = null;
    sectHeight = $('section').height();
    $('aside').height(sectHeight);
}
  • 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-17T23:54:32+00:00Added an answer on June 17, 2026 at 11:54 pm

    This sounds like a job for .get() *

    x.get();
    

    simple fiddle based on your submission

    Buuut, your function fromAsideToSection (which is cut-off by the way) is using $(this) so if this is an element or a jQuery object it doesn’t matter — jQuery will recognize it and $(this) will end up being essentially the same thing whether this is a jQuery object or the DOM elements. I stressed that in the fiddle.

    *Not to be confused with the ajax shorthand jQuery.get() ref: api.jquery.com/jQuery.get/

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

Sidebar

Related Questions

I'm currently using this code: $(function () { $(.mainmenu a).click(function () { $.cookie('value', '0',
The addStudent function and mainMenu function are the two that are important. #include <iostream>
I've a MainMenu.xib and a MyDocument.xib. I need to dynamically populate some NSMenuItem's from
I have this menu: http://tabletest.orgfree.com/ for which I use this function: function mainMenu(){ (function($){
Here is my code: public ActionResult MainMenu(int id) { using (WebDataContext context = new
I have a mainmenu with 5 items, 3 of them have one or more
So here is my situation. I have a Form (MainMenu) and a Frame (TestFrame).
I have a MainMenu in my app and I would like to have little
I want to log all clicks in a MainMenu control I am using in
I want to get reference on BaseController from AppDelegate. My MainMenu.xib's hierarchy is where

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.