After
I am able to create a hyperlink
, but Whenever I click the TD in the empty space inside TD
element , the HTML code (
>
tag that is dynamically added) TD
. When I click on the text of td
but it does not work properly, then I click on that empty space in that td
. Any help would be highly appreciated
Below is my code snippet: ..
$ (document) .ready (function () {$ ('# s_1_l') appears ("tr") each (function () {$ (this) .find ("td ") Eq (2) .html (.." lt; a href = '#' & gt; "+ $ (this) .find (" TD "). Eq (2) .text () +" & lt ; / A & gt; ");});});
Thanks in advance.
Chiranjit
After
Why are you trying to create a hyperlink? Sorry but it does not matter too much, if you want to attach some functions to those TD elements, which triggers on clicks, then you should only receive those TD elements the listener. Since you are already using jQuery, try something like this:
$ ("# s_1_l td: nth-child (3)"). Click (function () {// what should be done when the user clicks}}; // make the cursor an indicator. $ ("# S_1_l td: nth-child (3)"). CSS ( "Cursor", "indicator");
It is light in processing and adds a href to each end of looping in each set.
See and example: < / P>
Comments
Post a Comment