asp.net - Select control using jQuery - using value of hiddenfield -


I have a hidden field, which has the following markup:

  & lt; Input type = "hidden" name = "ctl00 $ ContentPlaceHolder1 $ LinksOverview1 $ ProductView $ ctrl1 $ ctl01 $ ctl00 $ DescriptionOfLink $ QuestionDivInfo" id = "ContentPlaceHolder1_LinksOverview1_ProductView_ctrl1_ctl00_3_DescriptionOfLink_3_QuestionDivInfo_3" value = "ContentPlaceHolder1_LinksOverview1_ProductView_ctrl1_ctl00_3_questionMark_3" / & gt;   

The value of my hidden area is similar to the ID of the period I have:

  & lt; Span id = "Content placeholder 1_LinksOverview 1_ProductView_ctrl1_ctl00_3_questionMark_3" class = "questionMarkLayout" & gt; & Lt (?); / Span & gt;   

Before knowing the code I do not know the ID of my span, but I can reach the value of my hidden area.

Use jQuery, I want:

  • Wrap the control with the ID of the value of my hidden area

    So far I have tried:

      & lt; Script type = "text / javascript" & gt; $ (Document) .ready (function () {alert ('& lt;% # QuestionDivInfo.ClientID% & gt;'); $ ('& lt;% # QuestionDivInfo.ClientID% & gt;') Val () Mouseover (function (e) {$ ('& lt;% # HintDiv.ClientID% & gt;') Show ();}); $ ('& lt;% # QuestionDivInfo.ClientID% & gt;') Val () .moveleave (function (e) {$ ('& lt;% # HintDiv.ClientID% & gt;') Hide ();});}); & Lt; / Script & gt;   

    But it does not work.

    Any hint? :)

    Use this code:

      $ (document) ) Ready (work (warning ('& lt;% # QuestionDivInfo.ClientID% & gt;'); var span = $ ("#" + $ ('& lt;% # QuestionDivInfo.ClientID% & gt;' ). Val ()); $ (Span) .mouseover (function (e) {$ ('& lt;% # hintDiv.ClientID% & gt;') Show ();}); $ (span) .mouseleave (Function (e) {$ ('& lt;% # HintDiv.ClientID% & gt;') Hide ();});});    

Comments