Unidentified problem with jQuery's .click() function -


I'm trying to add an 'onclick' function to an image on jQuery and for some reason it does not stick to it. My code looks like this: Create an arrow icon / button for

  // Li var img = $ ('& lt; img & gt; & lt; / & gt;') Attr ('id', i + 5) .attr ("src", "images / 16-arrow-right.png") .addClass ("expImg"). Click (function () {extension (this, 'tdb', 'years', 'danwoods')}) .appendTo (Lee);  

and the resulting element looks;

  & lt; Img id = "6" src = "image / 16-arrow-right.png" square = "expImg" />  

This leaves the onclick function completely, but everything else works well. Does anyone see a problem in my code, or what error is elsewhere? Thanks in advance ...

I hope the click event handler is defining to show you In an HTML rendering of an element, you are not actually "setting a code; click on; click on "; You are bound to create a function for the DOM click event, which is like a different thing. For starters, you can force many such tasks and they play well with each other.

If it is really important for you to present it, then try:

  .attr 


Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -