Skip to content
Advertisement

Tag: jquery

Scrolling text which is too long with jquery

I am trying to create a music player/centre online. I have a player that plays the music and displays the current track: As you can see from th title of the song it is too long for the div. What i would like to do is scroll the text and reset it an rescroll etc. I have attempted this with

AJAX and user leaving a page

I’m working on a chat and I’m trying to figure out how I can detect that the user has left the page or not. Almost everything is being handled by the database to avoid the front end from messing up. So what I’m trying to do is once the page is left for any reason (window closed, going to another

What’s the right mindset in using jQuery’s event.stopPropagation()

I have two approaches in mind on how to apply jQuery’s event.stopPropagation(): Optimistic approach – By default, all event handlers are without stopPropagation(). stopPropagation() would be added to a handler only if there’s some unnecessary and undesired behaviour caused by event bubbling. Pessimistic approach – By default, stopPropagation() is added to all event handlers. If there’s some desired behaviour missing

Markdown to convert double asterisks to bold text in javascript

i’m trying to make my own markdown-able textarea like Stackoverflow has done. The goal is to allow people to type **blah blah** in a textarea and have the output in a div be <span style=”font-weight:bold;”>blah blah</span>. I’m having trouble with the javascript to find and replace to the **asterisks with the HTML. here’s a jsfiddle which has gotten the party

Capturing jQuery form submit event

I don’t know what is wrong with that, because I was following at every step the tutorial from jquery.com regarding the form submit event. My Javascript: [Ofc. latest jQuery library is included]. Have also tried with the $(document).ready() event: Here is my HTML form code: So, regarding the above Javascript code, it is supposed to work (I mean it should

Advertisement