Thursday 15 May 2014

javascript - Displaying a at a particular index -


I'm developing a comment system using jquery, in fact I'm stuck in the part of displaying that part , Which displays the form specifically on the index. Let's say I have 5 links, if I click on the 4th link, then the form 4 should be displayed on the link position. But whenever I click on any link position, the form is displayed on the first link position. It should be displayed as we see in a comment system. I do not know whether to position something or something like that. A sample code from Jsfiddle has been posted below. If I have 3 links, whenever I click on any link, the form will be displayed on the first link. I would like to fix this issue, please help. Thanks

Here is the JSfield Link ""

  (function ($) {$ .fn.com mant system = function () {// var settings = $ .extend ( {Index: ind}); //if(settings.index) $ (this) .show ();}} (jQuery)); $ (Document) .ready (function () {hideForm (); createLink (); onLinkClick ();});    

One way to accomplish your goal is to add form For that div element at which the currently clicked link is, you can pass in the clicked element, and within the

comment system method Can add your form.

JS ::

  (function ($) {$ .fn.comment system = function} {$ (this) .inertAfter (link) .show ( );}} (JQuery)); . . . $ (".link"). Click (function (e) {$ (".form"). Comment system (e.currentTarget);});    

No comments:

Post a Comment