Skip to content

Commit f5a48fa

Browse files
committed
Remove demos from examples for removed methods
1 parent 91c454a commit f5a48fa

File tree

2 files changed

+5
-48
lines changed

2 files changed

+5
-48
lines changed

entries/jQuery.browser.xml

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,10 @@
2323
<example>
2424
<desc>Show the browser info.</desc>
2525
<code><![CDATA[
26-
jQuery.each(jQuery.browser, function(i, val) {
27-
$("<div>" + i + " : <span>" + val + "</span>")
28-
.appendTo( document.body );
29-
});]]></code>
30-
<css><![CDATA[
31-
p { color:green; font-weight:bolder; margin:3px 0 0 10px; }
32-
div { color:blue; margin-left:20px; font-size:14px; }
33-
span { color:red; }
34-
]]></css>
35-
<html><![CDATA[
36-
<p>Browser info:</p>
37-
]]></html>
26+
jQuery.each(jQuery.browser, function(i, val) {
27+
$("<div>" + i + " : <span>" + val + "</span>")
28+
.appendTo( document.body );
29+
});]]></code>
3830
</example>
3931
<example>
4032
<desc>Returns true if the current useragent is some version of Microsoft's Internet Explorer.</desc>
@@ -95,13 +87,6 @@
9587
$("p").html( "The version number of the rendering engine your browser uses is: <span>" +
9688
$.browser.version + "</span>" );
9789
]]></code>
98-
<css><![CDATA[
99-
p { color:blue; margin:20px; }
100-
span { color:red; }
101-
]]></css>
102-
<html><![CDATA[
103-
<p></p>
104-
]]></html>
10590
</example>
10691
<example>
10792
<desc>Alerts the version of IE's rendering engine that is being used:</desc>

entries/toggle-event.xml

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -45,35 +45,7 @@
4545
<p>The <code>.toggle()</code> method is provided for convenience. It is relatively straightforward to implement the same behavior by hand, and this can be necessary if the assumptions built into <code>.toggle()</code> prove limiting. For example, <code>.toggle()</code> is not guaranteed to work correctly if applied twice to the same element. Since <code>.toggle()</code> internally uses a <code>click</code> handler to do its work, we must unbind <code>click</code> to remove a behavior attached with <code>.toggle()</code>, so other <code>click</code> handlers can be caught in the crossfire. The implementation also calls <code>.preventDefault()</code> on the event, so links will not be followed and buttons will not be clicked if <code>.toggle()</code> has been called on the element.</p>
4646
</longdesc>
4747
<example>
48-
<desc>Click to toggle highlight on the list item.</desc>
49-
<code><![CDATA[
50-
$("li").toggle(
51-
function () {
52-
$(this).css({"list-style-type":"disc", "color":"blue"});
53-
},
54-
function () {
55-
$(this).css({"list-style-type":"disc", "color":"red"});
56-
},
57-
function () {
58-
$(this).css({"list-style-type":"", "color":""});
59-
}
60-
);
61-
62-
]]></code>
63-
<css><![CDATA[
64-
ul { margin:10px; list-style:inside circle; font-weight:bold; }
65-
li { cursor:pointer; }
66-
]]></css>
67-
<html><![CDATA[<ul>
68-
<li>Go to the store</li>
69-
<li>Pick up dinner</li>
70-
<li>Debug crash</li>
71-
72-
<li>Take a jog</li>
73-
</ul>]]></html>
74-
</example>
75-
<example>
76-
<desc>To toggle a style on table cells:</desc>
48+
<desc>Toggle a style on table cells. (Not recommended. Use .toggleClass() instead.):</desc>
7749
<code><![CDATA[$("td").toggle(
7850
function () {
7951
$(this).addClass("selected");

0 commit comments

Comments
 (0)