I'm trying to run a jquery script for my Drupal 8 site, but in the error console, I get a TypeError: $ is not a function. I know this usually happens when jQuery isn't loaded, but the jquery.min.js is loaded fine. Is it loaded too late? Do I perhaps need a wrapper?  In my theme.libraries.yml, I have the following:  global-styling:   version: 1.x   css:     theme:       css/style.css: {}   js:     js/script.js: {}   dependencies:     - core/jquery   My script is simply  $('#some-element').on('click', function() {   // Do something }   I would think this is all I need, or am I overlooking something?  Edit:  I don't think this is a duplicate question since:   This is Drupal 8 The dependency is defined in the libraries file. I would think this would take care of exactly the problem described in the other question.
$(function(){   $('.slider').mobilyslider({     content: '.sliderContent',     children: 'div',     transition: 'horizontal',     animationSpeed: 500,     autoplay: true,     autoplaySpeed: 9000,     pauseOnHover: true,     bullets: true,     arrows: true,     arrowsHide: true,     prev: 'prev',     next: 'next',     animationStart: function(){},     animationComplete: function(){}   });    });   I am integrating the above JavaScript file in a Drupal theme, but it is giving me the "$ is not function" error. I googled it, and changed the code bro the below, but it doesn't work either.  (function($) {   $('.slider').mobilyslider({     content: '.sliderContent',     children: 'div',     transition: 'horizontal',     animationSpeed: 500,     autoplay: true,     autoplaySpeed: 9000,     pauseOnHover: true,     bullets: true,     arrows: true,     arrowsHide: true,     prev: 'prev',     next: 'next',     animationStart: function(){},     animationComplete: function(){}   });    })(jQuery);   The above code gives me following error:     $('.slider').mobilyslider is not a function
Show that $\sin(z) = z$ has infinitely many solutions in complex numbers. Little Picard theorem should help, but using big Picard theorem is undesirable. Thanks a lot! Euclidean domain in which the quotient and remainder are always unique Let $R$ be a Euclidean domain in which the quotient and remainder are always unique. Does it follow that the ring $R$ is either a field or a polynomial ring $F[X]$ for some field $F$? Newsletter open and click tracking use http. Can i configure it that it uses https with our certificate? Can this cause block bounces? JavaScript post request like a form submit What is the difference between "nothing but", "anything but", and "everything but"? I would like to typeset some easy polyomino puzzles and therefore need a suitable LaTeX package. I could not find an easy to use package (other than using TikZ of course). Is there any approach other than using TikZ/PSTricks?  For anybody not aware of what polyominos are:   Edit: With a polyomino puzzle, I mean something like this:   So my intention is to put a set of polyominos into a given shape. Springer llncs TOC not working Controlling bandwith while using GPRS on Windows 7 I have an issue with my windows 7 machine using a lot of bandwith while connected to the internet. I'm trying to limit the bandwith by using Opera in Turbo mode, but some other program is sucking down content and emptying my GPRS mobile plan.   Is there some way I can control which applications are allowed to use bandwith while on GPRS? Preferable only Opera should be able to use the network.   Thanks. How did Rita know she lost the power? In Edge of Tomorrow, Emily Blunt's character, Rita Vrataski, had the time-resetting power previously.  She details the backstory of how she gained it, and how she lost it.  However, how did she know when she lost the power?  It's only triggered when the wielder dies.  Obviously she didn't die after losing the power, so how did she know the power was gone? Now this might be a very stupid question for many readers, but I am getting really confused.   I was reading about electricity and current, and I read this:  Suppose we connect a wire to the ends of a battery, and a bulb in the circuit, current flows and lights up the bulb. The battery is responsible for doing work on the positive charges to move them from negative terminal to positive terminal, that is moving against the field. Now, these energised positive charges move through the external circuit, and within the circuit they give some of their energy to light the bulb. I understood this very well.  Now, reading further, it was written that "Electrons are actually responsible for current flow". It was written that there is concentration of energised negative charges on the negative terminal, and these electrons then move through the external circuit from negative to positive terminal. This is really confusing.     So my question: What actually flows? The negative charge or the   positive charge?   Further reading, I also read that in semi-conductors, fluorescent light bulbs etc., both charges move through the circuit.     Now, one more doubt: If both charges move through the circuit in this   case, shouldn't the charges stop in the middle of the wire, because   opposite charges will attract each other, hence stopping their   movement? How to resolve a Java Rounding Double issue how can I find sum of series $ \sum_{n=1}^{\infty} (n\cdot \ln \frac{2n+1}{2n-1} - 1) $? It is so weird for me because I put this to Mathematica and it tells me that sum does not converge...  Let consider sum no to infinity, but to n  $$ \sum_{k=1}^{n} (k\cdot \ln \frac{2k+1}{2k-1} - 1) =$$ $$ ln \frac{3}{1}\cdot \left(\frac{5}{3}\right)^2 \cdot...\cdot \left(\frac{2n+1}{2n-1}\right)^n - n = ln \frac{1}{1}\cdot \frac{1}{3}\cdot \frac{1}{5}\cdot ... \frac{1}{2n-1} - n $$ but $$ n = ln e^n $$ so it will be $$ln\frac{1}{e^n} \cdot \frac{1}{1}\cdot \frac{1}{3}\cdot \frac{1}{5}\cdot ... \frac{1}{2n-1}$$  So the limit of it is $-\infty$ Have I done this well or I missed sth? How many Java string objects created in the code String s="abc"+"xyz";? Zlib-compatible compression streams? Merge pdfs sequentially I would like to merge 4 pdfs, pdf1.pdf, pdf2.pdf, pdf3.pdf pdf4.pdf together so that the pdfs are spliced, i.e. the first page will be the first page of pdf1, the second the first of pdf2, the third the first of pdf3, etc.  The pdf files are with plain images, no table of contents.  How would I accomplish this? It would be nice to do it from Terminal as well. Find Max Value for each month for the last 3 months, properly How can there be animals on the surface in Zion's world? It is apparently canon that  in Neo's day.  However, in the first movie, The Matrix, Morpheus tells Neo that one of the things known for certain is that humans "burned the sky" in order to deny solar engery to the machines, which in turn led to the humans who survived the War being plugged into the Matrix to provide bioelectric energy to supply the machines.  If there's not enough sunlight for solar power, how can there be enough to grow plants to serve as food for animals?  Low levels I can understand -- house plants, at least, thrive in conditions too dim for solar panels to produce cost-effective power -- but every surface scene we see in the trilogy is as dark as a cloudy night; light coming only from the machines.  That wouldn't begin to support photosynthesis, which means all animal life would starve in, at most, a matter of a few years. I am looping over the features of a shapefile containing multiple polygons. If  certain criteria are met, I want to save the current feature in a new shapefile.  I am doing this using GDAL 1.10.0 with Python 2.7.3  The code runs, creates the files I want, calculates the area correctly. In the shapefile that is created, the attribute table contains the propoer fields ('name' and FID). Two things are wrong:   No polygons are visible (in ArcMap). This seems to me particularly weird, because the polygons seem to me proper, in the sense that they are closed (and the area is calculated properly).  The coordinate system seems off (in Arc Catalog there appears in the bottom -20,9667 0,0000 (are these degrees??)), despite the fact that I am creating a projection file (they are in German national grid 3)   Any hints as to what the problems could be? I tried to put the relevant excerpt of the code below:  from osgeo import gdal, gdalnumeric, ogr, osr, gdalconst  ### prepare shapefile into which to save driver = ogr.GetDriverByName('ESRI Shapefile') path_matched = r'.../.../path' datasource = driver.CreateDataSource(path_matched) lyr_matched = 'matched_%s' % cur_id  # from above # Remove output shapefile if it already exists name_shpfile = lyr_matched + '.shp' if os.path.exists(os.path.join(path_matched, name_shpfile)):     driver.DeleteDataSource(os.path.join(path_matched, name_shpfile)) layer = datasource.CreateLayer(lyr_matched, geom_type=ogr.wkbPolygon) #layer.ResetReading() field_name = ogr.FieldDefn("name", ogr.OFTString) layer.CreateField(field_name)  ### prepare file in which I want to write the areas of matched polygons path_area = path_matched file_area = 'matched_area_%s.txt' % (cur_id) fobj_area = open(os.path.join(path_area, file_area), 'w')  ### original shape file containing all polygons shp = ogr.Open(shp_all)  # os fobj from above lyr = shp.GetLayer()  # loop over polygons in original shameful for FID in featList:     feat = lyr.GetFeature(FID)      # this is from the shapefile      cur_name = feat.GetField(1)      # ... work on conditions ...      if condition = true:         myPoly = ogr.Geometry(type=ogr.wkbPolygon)         cur_poly = feat.GetGeometryRef()         myPoly.AddGeometry(cur_poly)         cur_spat_ref = cur_poly.GetSpatialReference()          cur_area =  cur_poly.GetArea()         cur_area_string = "%s \t %f \n" % (gw_name_EZG, cur_area)         fobj_area.write(cur_area_string)          featur_dfn = layer.GetLayerDefn()         feature_abc = ogr.Feature(featur_dfn)         feature_abc.SetGeometry(myPoly)         feature_abc.SetField("name", cur_name)         feature_abc.SetFID(FID)         layer.CreateFeature(feature_abc)         myPoly.Destroy()         feature.Destroy()   # generate projection file prj_filename = lyr_matched + '.prj' file = open(os.path.join(path_matched, prj_filename), 'w') targetSR = cur_spat_ref targetSR.MorphToESRI() file.write(targetSR.ExportToWkt()) file.close()   datasource.Destroy() What is the difference between "INNER JOIN" and "OUTER JOIN"? Also how do LEFT JOIN, RIGHT JOIN and FULL JOIN fit in? Consider the question :    The large number of down-votes displays as 199 rather than a score of -199.  This is clearly unintentional (and unfortunate for questions that possess such voting!), but can this be&nbsp;corrected?