/    Sign up×
Community /Pin to ProfileBookmark

Why is this not working?

Hi,

I seem to be in a bit of confusing. I’m creating a tablesorter on JSFiddle and i have sortable columns where users can select a value from a drop down menu to sort the column.

However I’m struggling with the javascript coding when it comes to a image and making that sortable.

link to table – [url]http://jsfiddle.net/abkNM/6333/[/url]

As you can see in the javascript near the bottom i have inputted the image html to that it returns that image when clicked, however it is not doing so.

Line 45 for the HTML and 98 for the javascript

I know its not dead clear so dont hesitate to ask any questions, thanks.

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@JMRKERJul 01.2015 — I don't know if this is (part of) the problem,

but there should be a space between imgsrc in the following line (#98)

and before the 's' in "style=..."

<i>
</i> return /&lt;imgsrc="http://www.rswebsites.co.uk/mediafilm/wp-content/uploads/2012/03/bbfc-18-300x300.png"style="width:35px;height:35px;."&gt;s/2012/03/bbfc-18-300x300.png"/.test(n);


Or try this to avoid using so many escape '' characters
<i>
</i> return |&lt;img src="http://www.rswebsites.co.uk/mediafilm/wp-content/uploads/2012/03/bbfc-18-300x300.png" style="width:35px;height:35px;."&gt;s/2012/03/bbfc-18-300x300.png"|.test(n);
×

Success!

Help @tome9 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.4,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...