javascript - jQuery Modal and displaying different content -
Hi, I'm trying to display different content in one click. Modal works fine but I am trying to find more efficient ways to write the following code to display the content.
$ (document) .ready (function () {$ ('# click (function () {modal.open ({content: $ ("& lt; p> Display the content & lt; / p & gt; ", width:" 500px ", height:" 200px "}}}}} $ ('# block') .Holclass ('block 2'); {$ ( Click 'Block2'). (Function () {modal.open ({content: $ ("& lt; p & gt; contains different content "), width: "500px Click here (function () {modal.open}, "height": "200px"}}}}} $ ('# block'). HasClass ('block3' '500px ", height: ($" block3'). ({Content: $ ("& lt; p> and then separate " 200px "}))}}}}});
$ (robot ($ (This) .hasClass ('block1')) content = 'content1' if ($ (this) .hasClass ('block2') ) (Function () {var content = ''; content = 'content2' if ($ (this) .hasClass ('block2')) content = 'content3' modal.open ({content: $ ("& lt ; P & gt; "+ content +" & lt; / p & gt; "), width:" 500px ", height:" 200px "})}})});
Comments
Post a Comment