open <div> before element and close it after
问题 I'm creating a JQuery Plugin. I need to add automatically add a <div id="id"> before some code and the </div> after. When i do it with $('#search').before('<div id=id>') the div automatically close... this is the code: <div id="id"></div> <input type="text"value="" id="search"></input> <select id="select"></select> <table id="table"></table> <div id="current"></div> <div id="pagination"></div> i need to open a "div" before "#search" and close it after "#pagination" 回答1: The issue with your