Results 1 to 9 of 9

Thread: How to add custom close button option to invoke script?

  1. #1
    Join Date
    Feb 2012
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default How to add custom close button option to invoke script?

    1) Drop-in content box v2.0:

    2) http://www.dynamicdrive.com/dynamici...dropinbox.htm:

    I see the line in dropincontentbox.js to change the close image but how can I add that line to the invoke script within the HTML file just as the other options such as freq, showduration?

    This is what I tried without success
    <script>

    var dropinbox1=new dropincontentbox({
    source:'#dropbox',
    cssclass:'dropinbox standardshadow',
    showduration:20,
    freq:'always',
    deferred:1,
    closebutton:'<div class="closer"><img src="star.png" /></div>'

    })

    </script>

  2. #2
    Join Date
    Feb 2012
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I suspect the option has to be defined in dropincontentbox.js which I tried in line
    Code:
    this.s=jQuery.extend({fx:'easeOutBounce', fxtime:500, freq:'always', showduration:0, pos:['center','center'], deferred:0.5, closebutton:'star.png'}, options)
    I still got no results. Can someone please advise how to get this done?

    The key reason for this is that I use multiple instances of the script and each has a different styling but all have the same close button and it spoils the appearance.

  3. #3
    Join Date
    Feb 2012
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Still searching for a solution.

  4. #4
    Join Date
    Feb 2012
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I spent some hours at the jquery website and still cannot figure a solution

  5. #5
    Join Date
    Feb 2012
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Still no solution to get this done but still trying

  6. #6
    Join Date
    Feb 2012
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Went to stack overflow with the question and holding out for a reply there too. Will post solution if rendered.

  7. #7
    Join Date
    Nov 2010
    Posts
    11
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default

    Look through the supporting files and find the default image being used for the 'close' button and replace it. It may just use a css background image.

  8. The Following User Says Thank You to c1lonewolf For This Useful Post:

    kimosiris (03-05-2012)

  9. #8
    Join Date
    Feb 2012
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    The image is a literal source but I'll try using css

  10. #9
    Join Date
    Feb 2012
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    The image I have been able to control with css as suggested by lonewolf.
    I replaced the image with and empty container
    this.closebutton='<div class="closer"></div>'

    and included the class in the invoke script
    cssclass:'dropinbox standardshadow closer',

    Then changed as needed in the .css file.

    But now I want to use an option in the invoke script to show or hide the close button. The default hides it and then it displays when the object is hovered. Something like

    closebuttonhide: false

    Can someone advise how to do this?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •