Bug Tracker

Modify

Ticket #793 (closed bug: fixed)

Opened 6 years ago

Last modified 6 years ago

1.1b .css() seems to require the element HAS to be in DOM

Reported by: jonathanfreeman@… Owned by:
Priority: major Milestone: 1.1a
Component: core Version: 1.1a
Keywords: Cc:
Blocking: Blocked by:

Description

HTML:

<html>
<style>
	a {
		color: #555;
	}
</style>
<script src="jquery.js" type="text/javascript" ></script>
<script src="jquery.testing.js" type="text/javascript" /></script>
<script>
$(document).ready(function() 
{
	$("a.hello").testing();
	
});
</script>
<body>
	<a href="#" class="hello">Hello world.</a>
</body>
</html>

Lib:

$.fn.testing = function()
{
	var me = $(this).hide('slow'); //works
	var bro = $('#nobody').hide('slow'); //should return null
	var sis = $('#nobody').css('color'); //throws exception
}

Change History

comment:1 Changed 6 years ago by john

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

I think this has been resolved, it's not throwing an exception. .css("color") returns undefined (which is right) and .hide("slow") doesn't do anything (which it shouldn't).

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.