Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript fitvids.js generates div element within – why?

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #43594
    simonminter
    Member

    Fitvids.js works great, but I have a question about its workings. The JS generates styles that are then injected into the page markup, which is totally fair enough, but these are wrapped in a div (with the class .fit-vids-style), which is then placed within the <head> – before either the first <base> or <script> elements. As an example, view the generated source of http://fitvidsjs.com.

    Any idea why it’s wrapped in a div, rather than simply being <style> in the <head>? Is this valid? Really interested to know the thinking behind this… thanks!

    #129367
    TheDoc
    Member

    Fixed up your post for you. If you want to include inline HTML, just add backticks ` around the code. If you want to add blocks of code, indent by four spaces or select your code and click the code button. [More info on Markdown](http://daringfireball.net/projects/markdown/syntax “More info”).

    #185949
    rhiza
    Participant

    Ohmy, I have the exact same problem. Please see this site: josiahcatering.com , there’s a “-” on the top left corner of the page, and in the source code it says .fit-vids-style. Prob is, I dunno where to find this code (or whatever). I’m using a custom WordPress theme and I’m not sure how fitvids.js is used in this template. Please help! :-/

    #185964
    Senff
    Participant

    I don’t really see what you are referring to…I’m not seeing any element with the class “fit-vids-style”…?

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.