English 中文(简体)
我怎么能与一个瘫痪的派别建立联系?
原标题:How can I create links to an item in a collapsed accordion?

试图建立连接页的链接,其中含有破碎的礼让物品,每页都用红外号码识别。

• 试图通过在我的联系中增加参数来连接和打开具体项目:

sample.html#itemIdX  // opens to the page but not the item

sample.html?itemIdX  // same result

这些项目使用<代码>H3类别:

itemPreviewTitle accordionHeader ui-accordion-header ui-helper-reset ui-state-default ui-corner-all" role="tab" aria-expanded="false" aria-selected="false" tabindex="-1" style="zoom: 1;

我如何建立联系,使我的项目X得到扩大。

问题回答

看来,这比“。 并非所有工作都容易遵循,<代码>(<>>>>>>功能似乎没有广告。

从您的提问来看,你希望通过提及一分之四来开一个礼节。 无法从盒子中提取;你只能确定使用0基指数的章节(如0 = 第一部分,1 = 第二节等)。

说到这一点后,这种办法将发挥作用:

界定这种联系:

<a href="10387904_Accordion_link_2.html?openAccordionId=0">Open first item</a>
<a href="10387904_Accordion_link_2.html?openAccordionId=1">Open second item</a>
<a href="10387904_Accordion_link_2.html?openAccordionId=2">Open third item</a>

On the page containing the accordion, use the following code to extract the ID from the query string and initialise the accordion with the relevant section activated:

// Using the parseQueryString extension from
// http://paulgueller.com/2011/04/26/parse-the-querystring-with-jquery/
$.extend({
    parseQuerystring: function () {
        var nvpair = {};
        var qs = window.location.search.replace( ? ,   );
        var pairs = qs.split( & );
        $.each(pairs, function (i, v) {
            var pair = v.split( = );
            nvpair[pair[0]] = pair[1];
        });
        return nvpair;
    }
});

// Get the index of the section we want to open from the querystring.
var openAccordionId = parseInt($.parseQuerystring()["openAccordionId"]);

// Initialise the accordion with the active section defined.
var accordion = $("#accordion").accordion({ active: openAccordionId });

// Note: for some reason, the following does not work:
//  var accordion = $("#accordion").accordion();
//  accordion.activate(openAccordionId);




相关问题
getGridParam is not a function

The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...

selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

jQuery cycle page with links

I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

jConfirm with this existing code

I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...

Wrap text after particular symbol with jQuery

What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...

热门标签