Ask Question Forum:
Model Library:2025-02-08:A.I. model is online auto reply
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by Richard Morris
at 2024-07-25 21:39:18
Point:500 Replies:8 POST_ID:829114USER_ID:12010
Topic:
Asynchronous Javascript and XML (AJAX);jQuery;JavaScript
I need a zero written into empty spans if they are empty, else no change required.
Example:
<span id="empty1"></span> // change to <span id="empty1">0</span>
<span id="empty2">1</span> // no change required
Example fiddle:
http://jsfiddle.net/RichardMorris/D5XJ6/
Example:
<span id="empty1"></span> // change to <span id="empty1">0</span>
<span id="empty2">1</span> // no change required
Example fiddle:
http://jsfiddle.net/RichardMorris/D5XJ6/
Author: Richard Morris replied at 2024-07-25 23:34:10
Accepted Solution
Expert: duncanb7 replied at 2024-07-25 23:19:24
500 points EXCELLENT
I am using older one.
Done
Duncan
Done
Duncan
Author: Richard Morris replied at 2024-07-25 23:17:23
1.10.2 is what's on the server and I can't change it to older.
So what works best for 1.10.2 requirements?
So what works best for 1.10.2 requirements?
Expert: duncanb7 replied at 2024-07-25 23:12:49
Both also works I tested at my server
Duncan
Duncan
Expert: duncanb7 replied at 2024-07-25 23:10:34
it works for me at my side,
$('(#empty1,#empty2):empty').text("0");
it might depend on version of jquery
Duncan
$('(#empty1,#empty2):empty').text("0");
it might depend on version of jquery
Duncan
Author: Richard Morris replied at 2024-07-25 23:09:10
Hello Duncan,
Doesn't work in my template but this does:
$('#empty1:empty,#empty2:empty').text("0");
Let me know if this will be okay?
Doesn't work in my template but this does:
$('#empty1:empty,#empty2:empty').text("0");
Let me know if this will be okay?
Expert: duncanb7 replied at 2024-07-25 22:28:16
Ignore my previous post
Try this,
$('(#empty1,#empty2):empty').text("0");
it should work
Please read the :empty selector at jquery site
http://api.jquery.com/empty-selector/
Duncan
Try this,
$('(#empty1,#empty2):empty').text("0");
it should work
Please read the :empty selector at jquery site
http://api.jquery.com/empty-selector/
Duncan
Expert: duncanb7 replied at 2024-07-25 22:17:37
$('#empty1,#empty2:empty').text("0");
Try this
Duncan
Try this
Duncan