/    Sign up×
Community /Pin to ProfileBookmark

editable content is not showing

Hi everyone.

I am trying run this fiddle.
[url]http://jsfiddle.net/RZZ6X/9/[/url]

it shows in the console that jquery is not defined.

I already placed jquery as the first script to load yet it keeps showing this error. here’s how I did it:

[code=html] <head>
<script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js”></script>

<title>Sports App @yield(‘title’)</title>

<script type=”text/javascript” src=”{{ URL::asset(‘js/status.js’) }}”></script>

<link rel=”stylesheet” href=”{{ elixir(‘css/app.css’) }}”

</head>[/code]

Any Idea about how do I make it better?

to post a comment
HTML

8 Comments(s)

Copy linkTweet thisAlerts:
@SempervivumFeb 08.2016 — Your fiddle is OK regarding inclusion of jQuery. But what do you intend this script to do? replace() returns the string after replacement and your if checks whether that string is empty. In this case the element is emptied which has no visible effect. Please post what you intend to do.
Copy linkTweet thisAlerts:
@osherdoauthorFeb 08.2016 — @Sempervivum thanks for replying.

I moved forward with this issue; Now I have the problem that the placeholder is not showing again after I fully delete the text in the contenteditable section of the div. that's what's needs to be achieved and it would be perfect at last.

It seems that Jquery is being loaded (I can only see it in the page source).

I have attached updated fiddle of my existing code (css is compiled into sass but in the fiddle it's plain css and jquery code is in seperate page)

https://jsfiddle.net/yp046e30/

Another issue I am encountering is that when I am changing names of the div class (<div class="test"), function name of jquery ( $(".test") to $(".status") ) and also property names in css (test,mentioned 3 times) - the contenteditable box is gone. Why?

thanks very much.
Copy linkTweet thisAlerts:
@SempervivumFeb 08.2016 —  that the placeholder is not showing again after I fully delete the text in the contenteditable section of the div. that's what's needs to be achieved and it would be perfect at last.[/QUOTE]
The placeholder won't show again until you code it to do:

https://jsfiddle.net/yp046e30/1/

Another issue I am encountering is that when I am changing names of the div class (<div class="test"), function name of jquery ( $(".test") to $(".status") ) and also property names in css (test,mentioned 3 times) - the contenteditable box is gone. Why?[/QUOTE]I can't see any reason why this shouldn't work. I recommend posting a new fiddle for this issue.
Copy linkTweet thisAlerts:
@osherdoauthorFeb 08.2016 — thanks for repying. I find something odd:

The browser I was checking this page is Firefox. It did not returned placeholder after deleting text with both empty method and element.text("How's your fitness going?..."); you suggested.

And then I was checking the page with Chrome broswer and both methods worked perfectly! (placeholder has been shown again after text delete)

Can you explain that difference? is there any idea about how can I make it working also in Firefox?

Here's the fiddle for the name changing ( I replaced the name 'test' with 'status'):

https://jsfiddle.net/v4qL77e1/

I swear I don't know what's wrong. It does work in the fiddle as well with the name 'status' but not in the app.
Copy linkTweet thisAlerts:
@SempervivumFeb 08.2016 — You are right, your fiddle is working fine. Unfortunately I'm using Opera and Firefox is not working for me. Maybe someone else can assist you.
Copy linkTweet thisAlerts:
@osherdoauthorFeb 08.2016 — No problem. Thanks for your time.
Copy linkTweet thisAlerts:
@kjstoreFeb 08.2016 — Regards, I enjoy this.

http://www.kidsjunction-store.com/
Copy linkTweet thisAlerts:
@Kevin2Feb 08.2016 — "placeholder" is not a valid attribute for <div>. One possible explanation for the spotty behavior.
×

Success!

Help @osherdo spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...