I am using the jQuery lightbox colorbox plugin ( http://colorpowered.com/colorbox/ ) and I want to be able to create a url like www.example. com / about-me.html, which will send the user to my site and open the iframed page (about-me.html) in the lightbox script.
I believe that I need to use event hooks or something like that, but I'm not sure how to achieve the result. Any help was appreciated.
The loan goes to Jack Moore in google colorbox group.
:
var url = document.location.href; if(url.search(/\?about-me/i) !== -1){ $(".iframe:first").click(); }
, URL- : www.example.com?about-me. , javascript colorbox, .
google : http://groups.google.com/
edit -
, , , , window.load dom ready, :
$(document).ready(function () { if(document.location.hash){ //launch colorbox and use this hash $.fn.colorbox({width:"50%", inline:true, href:""+document.location.hash+""}); } });
, . , iframe. , :
( )
$(".iframe").colorbox({iframe:true}); <p><a class='iframe' href="http://google.com">Outside webpage (IFrame)</a></p>
: , URL- - , URL- . , url iframe , , - .
http://www.example.com/main?load=about.htm
- MVC, :
http://www.example.com/main/about
. , , about.htm iframe.
Source: https://habr.com/ru/post/1716969/More articles:Getting an array of strings from an array of objects - arraysC # .NET is a remote path to a directory or file - c #Convert NSString with a number to the appropriate localization format for a phone number - objective-cWhy is my regex matching version number not working? - regexA standalone GTK application when there is no X window environment - linuxJava, Java VM, Java Platform, - javaUsing stored procedures in C # - c #https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1716972/conforms-to-stands-for-in-iphone-terminology&usg=ALkJrhgNsnwhjQshYeMBPkR29vtmrsdlrAPHP: two values ββin case of Switch? - phphow to change font style of text in textbox when clicked? - javascriptAll Articles