Bug Tracker

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#2913 closed bug (invalid)

function attr() was Ineffective in opera

Reported by: Rory Owned by:
Priority: major Milestone: 1.2.4
Component: core Version: 1.2.3
Keywords: attr Cc:
Blocked by: Blocking:


code: <iframe id="test_frame" src="test.php"></iframe>

use jquery: $(function() {

$('#test_frame').attr('src', $('#test_frame').attr('src'));


i want that test_frame will reload (like window.location.reload()), but in opera it was Ineffective , please help me! thanks.

Change History (2)

comment:1 Changed 8 years ago by flesler

  • Resolution set to invalid
  • Status changed from new to closed

It's kind of expected that re-setting the same src could not actually reload. try

 $('#test_frame').attr('src','').attr('src', $('#test_frame').attr('src')); 

If it doesn't work, you'll need to access the location object or something like that.

comment:2 Changed 8 years ago by flesler

Sorry, that code was wrong. Try this instead.

var oldsrc = $('#test_frame').attr('src');
$('#test_frame').attr( 'src','' ).attr( 'src', oldsrc );
Note: See TracTickets for help on using tickets.