0 Question: jQuery Splitter: percent insted of pixels

question created at Sat, Jun 1, 2019 12:00 AM

Currently I work with this Script: https://github.com/mostafacs/jquery.splitter

Default setting is:

    orientation: 'horizontal',
    limit: 10,
    position: '50%' // if there is no percentage it interpret it as pixels

The »10« are pixels. I want there 30 percent instead of the 10 pixels. How is it possible to change that?

Thanks, love

  1. That plugin doesn't seem designed to handle percentages. It uses jQuery's position() and offset() which return pixel values. But it's possible to convert pixel values to percentages based on the container's width and the plugin could potentially be modified or extended to include that functionality. Besides extending the plugin yourself, you might consider raising an issue (feature request) on the plugin's GitHub page.
    2019-06-01 04:51:06Z
  2. On a side note, the plugins ability to horizontally split is broken in all browsers that I have just tested it in (Chrome, Firefox, Edge, IE7-11).
    2019-06-01 05:00:26Z
  3. @BlueWater86 I see what you mean. Looks like it hasn't been maintained in several years. Maybe someone will do a pull request :) This version seems to work better and accept percentages.
    2019-06-01 05:11:04Z
  4. showdev : Thank you for the information! BlueWater86 : That is funny – I have this problem with the newer version ... showdev again : How is it possible there with percent?
    2019-06-01 06:56:43Z
  5. I haven't tried it, but that version seems to accept a "percent" parameter (see #7).
    2019-06-01 07:00:41Z
0 Answers 0
source placed here