Side navigation
#8548 closed bug (invalid)
Opened March 17, 2011 10:25AM UTC
Closed March 25, 2011 08:19PM UTC
Accesing all img element having "icon_notify_green_enabld_16.png" as src value in the end.
Reported by: | anonymous | Owned by: | anonymous |
---|---|---|---|
Priority: | undecided | Milestone: | 1.next |
Component: | unfiled | Version: | 1.5.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I want to acces all Img element in a HTML Document having "icon_notify_green_enabld_16.png" value in the last of SRC attribute
Eg : <img id="ctl00_ctl00_MainPageBody_SubMaster_dlstKpiSummaries_ctl04_gvKPIs_ctl03_ThresholdIcon" style="border-right-width: 0px; width: 16px; border-top-width: 0px; border-bottom-width: 0px; height: 16px; border-left-width: 0px;" src="Common/Images/icon_notify_green_enabld_16.png" complete="complete"/>
following code gives me same using Jquery 1.4.1
<div id="greenSign" onclick="showHideColor('img[src$=icon_notify_green_enabld_16.png]','#74B749')">
</div>
function showHideColor(item, color) {
debugger;
var imgs = $(item);
for (i = 0; i < imgs.length; i++) {
var img = imgs[i];
var td = img.parentNode.nextSibling;
if (td != null) {
if (td.style.backgroundColor != '') {
td.style.backgroundColor = '';
}
else {
td.style.backgroundColor = color;
}
}
}
But by using Jquery 1.5.1 throwing exception in following line
var imgs = $(item);
Attachments (0)
Change History (2)
Changed March 17, 2011 02:52PM UTC by comment:1
owner: | → anonymous |
---|---|
status: | new → pending |
Changed March 25, 2011 08:19PM UTC by comment:2
resolution: | → invalid |
---|---|
status: | pending → closed |
Thanks for submitting a ticket to the jQuery Bug Tracker. We're unfortunately unable to assist with debugging or solving projects without a valid reproduced test case but if you require more assistance here, please feel free to use the jQuery Forums or the #jquery channel on freenode.
Thanks for submitting a ticket to the jQuery Bug tracker. Could you kindly submit a reduced test case that reproduces the issue you're experiencing on http://jsFiddle.net?. This will allow us to fully evaluate whether the issue you are experiencing is indeed due to jQuery core or whether it's simply a bug with your code.