javascript - Javarscript issues with dynamic tooltipster -
I think I'm using a nice jquery plugin
I still have my tooltips dynamic Need to be, which I do not believe it should be tough Although I wrote a script and maybe it is because I'm tired or I do not have the simplest address of javascript. Maybe the combination of both
I can not seem around this particular error TypeError: $ (.. .) The tooltipster function is not.
Here is the basic JavaScript code:
$ ("img # box_image [data-img- (" data-img-number "); var w =" http: //trailerbrokerimages.s3.amazonaws.com/pics/ "+ i; window.console.log ('before tool); window.console.log (' before tool 'w); tool (w);}); Tool tool = function (w) {$ ('tooltip_two'). Tooltipster ({content: $ ('& lt; span & gt; & lt; img style = "height: 191 pix; width: 256 px;" src = "Http: // trailerbromerges.s3.amazonaws.com/pics/'+w+ '"> ;)); code An example can be found at
I suspect that it is lame in my part Thank you. Thank you.
You have the same ID for multiple elements box_image I I understand that you are trying to make it unique by adding data-img-number , but this will not work, because there is no such way You can do this as long as you do not specify the different hover handler. Instead, you can attach the handler to hover in a class. Your & lt; Img / & gt; Add a class = "box_image" and add hover to elements >> $ (". Box_image") in the elements. . Hover (// your remaining code here //) This should give you the desired functionality
Comments
Post a Comment