views:

38

answers:

1

This is the dynamic example jsFiddle dynamic DEMO CLICK ME and This is static example jsFiddle static DEMO CLICK ME

When I load markup dynamically into div it is not working in IE7.

But if it is a static it works fine.

Yesterday I was unable to state my problem clearly so I made this fiddle.

Please check it out and reply.

A: 

This happens because IE6/7 normalize their href attributes. Change the $li selector to search for the file name at the end of the href, like this:

$li = jQuery('#siteMap [href$=' + $lnkStr1 + ']').parents('li');
Bundyo
I have already done that var $lnkStr1 = window.frames['frameMiddle'].location.href;$lnkStr1 = $lnkStr1.split("/")[$lnkStr1.split("/").length - 1];$li = jQuery('#siteMap [href$=' + $lnkStr1 + ']').parents('li');
cloudlight
Sorry, didn't understand - does it work? Because it works for me (even without the splitting): http://www.jsfiddle.net/xHPxe/1/
Bundyo
Instead hardcoded $linkstr1 I am taking it from frames document location.href object in original example...now it is something like *http://localhost/../ProductList.aspx*, So to get only "ProductList.aspx", I did that splitting work.
cloudlight